/* style.css */

/*Design tokens — dark theme by default, light theme override*/
:root {
    --bg: #0a0a0f;
    --surface: #13131a;
    --border: rgba(255, 255, 255, 0.07);
    --text-primary: #f0f0f5;
    --text-secondary: #8888a0;
    --text-muted: #555568;
    --accent: #7c6af7;
    --accent-glow: rgba(124, 106, 247, 0.15);
    --accent-bright: #a394ff;
    --tag-bg: rgba(124, 106, 247, 0.12);
    --tag-text: #a394ff;
    --card-hover: rgba(124, 106, 247, 0.05);
    --nav-line: #2a2a38;
    --spotlight-x: 50%;
    --spotlight-y: 50%;
    --mobile-header-height: 60px;
    --sidebar-width: 380px;
}

[data-theme="light"] {
    --bg: #fafaf8;
    --surface: #f2f2ef;
    --border: rgba(0, 0, 0, 0.08);
    --text-primary: #0f0f1a;
    --text-secondary: #4a4a6a;
    --text-muted: #9999b0;
    --accent: #5b4de8;
    --accent-glow: rgba(91, 77, 232, 0.1);
    --accent-bright: #5b4de8;
    --tag-bg: rgba(91, 77, 232, 0.08);
    --tag-text: #5b4de8;
    --card-hover: rgba(91, 77, 232, 0.04);
    --nav-line: #dddde8;
}

/*Reset and base*/
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-secondary);
    transition: background-color 0.4s ease, color 0.4s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, .font-display {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a { text-decoration: none; }
ul { list-style: none; }

/* Cursor-tracked spotlight glow */
.spotlight {
    --x: var(--spotlight-x);
    --y: var(--spotlight-y);
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(700px at var(--x) var(--y), var(--accent-glow), transparent 80%);
    transition: background 0.1s ease-out;
    will-change: background;
}

/*Mobile header and navigation*/
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--mobile-header-height);
    z-index: 1000;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: rgba(10, 10, 15, 0.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: background 0.4s ease;
}

[data-theme="light"] .mobile-header {
    background: rgba(250, 250, 248, 0.92);
}

.mobile-brand {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s ease;
    position: relative;
}

.menu-toggle:hover { background: var(--border); }

/* Hamburger icon — animates into an X when active */
.hamburger {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: background 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    left: 0;
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1), top 0.35s ease;
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.menu-toggle.active .hamburger { background: transparent; }

.menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Slide-in mobile menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100dvh;
    background: var(--bg);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    transition: right 0.45s cubic-bezier(0.23, 1, 0.32, 1);
}

.mobile-menu.open { right: 0; }

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px 24px;
    width: 100%;
    max-width: 400px;
}

.mobile-nav-link {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(22px, 6vw, 28px);
    font-weight: 700;
    color: var(--text-secondary);
    transition: color 0.3s ease, transform 0.3s ease;
    display: block;
    padding: 8px 0;
    letter-spacing: -0.01em;
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
    color: var(--text-primary);
    transform: translateX(4px);
}

.mobile-menu-divider {
    width: 48px;
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

.mobile-social {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 8px;
}

/*Page layout*/
.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Sidebar — sticky on desktop, hidden below the breakpoint */
.sidebar {
    display: none;
    position: sticky;
    top: 0;
    max-height: 100vh;
    padding: 80px 0;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    /* Visually hide the scrollbar — content overflow is rare */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar { display: none; }

.sidebar-top { flex: 1; }
.sidebar-bottom { padding-top: 30px; }

.sidebar-nav { margin-top: 30px; }

/* Hero block (desktop sidebar) */
.hero-name {
    font-size: clamp(36px, 3.5vw, 48px);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin-top: 20px;
    margin-bottom: 10px;
}

.hero-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--accent-bright);
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}

.hero-bio {
    font-size: 14px;
    line-height: 1.75;
    max-width: 290px;
    color: var(--text-secondary);
}

/* Stats card */
.stats-row {
    display: flex;
    gap: 24px;
    margin-top: 32px;
    padding: 20px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    align-items: center;
}

.stat-item {
    flex: 1;
    min-width: 0;
}

.stat-num {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    white-space: nowrap;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
    flex-shrink: 0;
}

/* Side nav links — line grows on hover/active */
.nav-link {
    display: flex;
    align-items: center;
    padding: 10px 0;
    gap: 16px;
    cursor: pointer;
}

.nav-line {
    height: 1px;
    width: 32px;
    background: var(--nav-line);
    flex-shrink: 0;
    transition: width 0.4s cubic-bezier(0.77, 0, 0.175, 1), background 0.3s ease;
}

.nav-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.nav-link:hover .nav-line,
.nav-link.active .nav-line {
    width: 64px;
    background: var(--text-primary);
}

.nav-link:hover .nav-text,
.nav-link.active .nav-text {
    color: var(--text-primary);
    letter-spacing: 0.2em;
}

/* Social icons */
.social-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.social-icon {
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    position: relative;
    z-index: 10;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icon:hover {
    color: var(--accent-bright);
    transform: translateY(-3px);
}

/* Theme toggle */
.theme-btn {
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 8px;
    position: relative;
    z-index: 10;
    transition: color 0.3s ease, background 0.3s ease;
}

.theme-btn:hover {
    color: var(--text-primary);
    background: var(--border);
}

.desktop-theme-btn {
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 10px;
    transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.desktop-theme-btn:hover { border-color: var(--accent); }

.mobile-theme-btn {
    padding: 8px;
    border-radius: 8px;
}

/*Main content*/
.main-content {
    padding: 32px 0 80px;
}

/* Mobile hero — desktop hides this block */
.mobile-hero {
    margin-bottom: 48px;
}

.mobile-badge-wrap { margin-bottom: 10px; }

.mobile-hero-name {
    font-size: clamp(32px, 8vw, 40px);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin-bottom: 8px;
    margin-top: 8px;
}

.mobile-hero-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-bright);
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

.mobile-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.mobile-stat-item {
    text-align: center;
    padding: 12px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    flex: 1;
    min-width: 80px;
}

.mobile-stat-item .stat-num { font-size: 22px; }

.mobile-social-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* Sections */
.content-section {
    margin-bottom: 72px;
    scroll-margin-top: 80px;
}

.section-label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.mobile-only-label { display: none; }

.section-cta { margin-top: 28px; }

/* Availability badge */
.badge-available {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
    padding: 5px 12px;
    border-radius: 100px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    animation: pulseDot 2s infinite;
    flex-shrink: 0;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.8); }
}

/* Cards (experience + project)*/
.card {
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.card--stacked { margin-bottom: 12px; }

.card:hover {
    background: var(--card-hover);
    border-color: var(--border);
}

/* Accent rail that slides in on hover */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--accent);
    border-radius: 12px 0 0 12px;
    transition: height 0.35s ease;
}

.card:hover::before { height: 100%; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.card-header--simple {
    display: block;
    margin-bottom: 12px;
}

.exp-date {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.exp-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(14px, 2vw, 16px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.exp-company {
    font-size: 13px;
    color: var(--accent-bright);
    font-weight: 500;
}

.project-card { padding: 16px; }

.project-link {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 18px;
    align-items: start;
}

.project-img-wrap { flex-shrink: 0; }

.project-img {
    border-radius: 8px;
    border: 1px solid var(--border);
    object-fit: cover;
    width: 100%;
    aspect-ratio: 16 / 10;
    transition: border-color 0.3s ease;
}

.card:hover .project-img { border-color: rgba(124, 106, 247, 0.3); }

.project-info { min-width: 0; }

.project-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 8px;
    flex-wrap: wrap;
}

.project-name {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(14px, 2vw, 16px);
    font-weight: 700;
}

.project-year {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    flex-shrink: 0;
}

.project-desc {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Tags */
.tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    background: var(--tag-bg);
    color: var(--tag-text);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 100px;
    white-space: nowrap;
    transition: transform 0.2s ease;
}

.tag:hover { transform: scale(1.05); }

.tag-current {
    white-space: nowrap;
    align-self: flex-start;
    flex-shrink: 0;
}

/* Skills block */
.skills-block {
    margin-top: 28px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.skills-label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
}

/* Body copy */
.body-text {
    font-size: 15px;
    line-height: 1.85;
    color: var(--text-secondary);
}

.body-text--spaced { margin-bottom: 16px; }

.text-emphasis {
    color: var(--text-primary);
    font-weight: 600;
}

/* Arrow + CTA links */
.arrow-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    z-index: 10;
    transition: color 0.3s ease;
}

.arrow-link svg {
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.arrow-link:hover { color: var(--accent-bright); }
.arrow-link:hover svg { transform: translate(3px, -3px); }
.arrow-link-right:hover svg { transform: translateX(5px) !important; }

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-bright);
    border: 1px solid rgba(124, 106, 247, 0.4);
    padding: 13px 26px;
    border-radius: 8px;
    background: var(--tag-bg);
    cursor: pointer;
    position: relative;
    z-index: 10;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.cta-btn:hover {
    background: rgba(124, 106, 247, 0.2);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.cta-btn svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.cta-btn:hover svg { transform: translate(3px, -3px); }

/* Contact */
.contact-block { max-width: 520px; }

.contact-heading {
    font-size: clamp(26px, 4vw, 34px);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.contact-copy { margin-bottom: 32px; }

/* Footer */
.site-footer {
    padding-top: 40px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.footer-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 400px;
}

.footer-link {
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-link:hover {
    color: var(--accent-bright);
    border-color: var(--accent-bright);
}

.footer-copy {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

/*Animations and accessibility*/
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in   { animation: fadeUp 0.7s ease both; }
.fade-in-2 { animation: fadeUp 0.7s 0.10s ease both; }
.fade-in-3 { animation: fadeUp 0.7s 0.20s ease both; }
.fade-in-4 { animation: fadeUp 0.7s 0.35s ease both; }
.fade-in-5 { animation: fadeUp 0.7s 0.50s ease both; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: var(--nav-line);
    border-radius: 3px;
}

::selection {
    background: rgba(124, 106, 247, 0.3);
    color: var(--text-primary);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .spotlight { display: none; }
}

/* Responsive breakpoints */

/* Mobile — up to 767px */
@media (max-width: 767px) {
    .mobile-header { display: flex; }

    body { padding-top: var(--mobile-header-height); }

    .page-wrapper { padding: 0 16px; }

    .main-content { padding: 24px 0 60px; }

    .content-section {
        margin-bottom: 56px;
        scroll-margin-top: 72px;
    }

    .mobile-only-label { display: block; }

    .body-text { font-size: 14px; }

    /* Stack project image above info on small screens */
    .project-link {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .project-img-wrap { max-width: 100%; }
    .project-img { aspect-ratio: 16 / 9; }
    .project-desc { font-size: 13px; }

    .stats-row {
        gap: 12px;
        padding: 14px;
    }

    .stat-num { font-size: 22px; }
}

/* Tablet — 768px to 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
    .mobile-header { display: flex; }

    body { padding-top: var(--mobile-header-height); }

    .page-wrapper {
        padding: 0 32px;
        max-width: 780px;
    }

    .main-content { padding: 32px 0 80px; }

    .mobile-hero { display: block; }

    .mobile-only-label { display: block; }

    .project-link {
        grid-template-columns: 140px 1fr;
        gap: 18px;
    }

    .mobile-stats { gap: 12px; }
    .mobile-stat-item { padding: 14px 24px; }
}

/* Desktop — 1024px+ */
@media (min-width: 1024px) {
    body { padding-top: 0; }

    .mobile-header,
    .mobile-menu,
    .mobile-hero,
    .mobile-only-label { display: none; }

    .page-wrapper {
        padding: 0 48px;
        display: flex;
        gap: 64px;
        min-height: 100vh;
    }

    .sidebar {
        display: flex;
        width: var(--sidebar-width);
        min-width: var(--sidebar-width);
        flex-shrink: 0;
        padding: 60px 0;
    }

    .main-content {
        flex: 1;
        min-width: 0;
        padding: 60px 0 80px;
    }

    .content-section { scroll-margin-top: 80px; }

    .project-link {
        grid-template-columns: 140px 1fr;
        gap: 20px;
    }

    .body-text { font-size: 15px; }
}

/* Large desktop — 1280px+ */
@media (min-width: 1280px) {
    :root { --sidebar-width: 420px; }

    .page-wrapper {
        padding: 0 64px;
        gap: 80px;
    }

    .project-link {
        grid-template-columns: 160px 1fr;
        gap: 22px;
    }
}

/* Extra small — below 380px */
@media (max-width: 380px) {
    .page-wrapper { padding: 0 12px; }

    .mobile-stats { gap: 8px; }

    .mobile-stat-item {
        padding: 10px 14px;
        min-width: 70px;
    }

    .cta-btn {
        font-size: 11px;
        padding: 12px 20px;
    }

    .hero-name,
    .mobile-hero-name {
        font-size: 30px;
    }
}