/* ─────────────────────────────────────────
   DESIGN SYSTEM
───────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg:        #060a10;
    --bg-alt:    #0c1220;
    --surface:   #101826;
    --border:    rgba(34, 211, 238, 0.12);
    --border-hl: rgba(34, 211, 238, 0.35);
    --cyan:      #22d3ee;
    --cyan-dim:  rgba(34, 211, 238, 0.15);
    --indigo:    #818cf8;
    --text:      #e2eaf4;
    --text-muted:#7a8ba0;
    --text-dim:  #4a5a6e;
    --nav-h:     68px;
    --max-w:     1120px;
    --radius:    14px;
    --transition:0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ─── KEYFRAMES ─── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}
@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50%       { opacity: 0.8; transform: scale(1.1); }
}
@keyframes badgeDot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.4); }
    70%       { box-shadow: 0 0 0 8px rgba(34, 211, 238, 0); }
}
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50%       { transform: translateY(6px); opacity: 1; }
}

/* ─── BASE ─── */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

.mono {
    font-family: var(--font-mono);
}

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 28px;
}

/* ─── SCROLL REVEAL ─── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─────────────────────────────────────────
   NAVIGATION
───────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    transition: background var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
    background: rgba(6, 10, 16, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 28px;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color var(--transition);
}

.nav-logo:hover { color: var(--cyan); }

.logo-bracket {
    color: var(--cyan);
}

.nav-links {
    display: flex;
    gap: 36px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--cyan);
    transition: width var(--transition);
}

.nav-links a:hover {
    color: var(--cyan);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active-link {
    color: var(--cyan);
}

.nav-links a.active-link::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
}

.nav-mobile {
    display: none;
    flex-direction: column;
    padding: 12px 28px 20px;
    background: rgba(6, 10, 16, 0.97);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
}

.nav-mobile.open {
    display: flex;
}

.nav-mobile a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    transition: color var(--transition);
}

.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--cyan); }

/* ─────────────────────────────────────────
   HERO
───────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: calc(var(--nav-h) + 60px) 28px 80px;
}

.hero-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(34, 211, 238, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    animation: glowPulse 6s ease-in-out infinite;
}

.hero-glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.12) 0%, transparent 70%);
    top: -100px;
    left: -150px;
    animation-delay: 0s;
}

.hero-glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.1) 0%, transparent 70%);
    bottom: -80px;
    right: -100px;
    animation-delay: -3s;
}

.hero-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border-hl);
    color: var(--cyan);
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.badge-dot {
    width: 7px;
    height: 7px;
    background: var(--cyan);
    border-radius: 50%;
    animation: badgeDot 2s infinite;
}

.hero-name {
    font-size: clamp(3.2rem, 8vw, 6.5rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    background: linear-gradient(160deg, #ffffff 0%, #a8c8e8 60%, var(--cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-role {
    font-family: var(--font-mono);
    font-size: clamp(0.95rem, 2.2vw, 1.15rem);
    color: var(--cyan);
    background: var(--cyan-dim);
    border: 1px solid var(--border-hl);
    padding: 10px 22px;
    border-radius: 8px;
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.cursor-blink {
    animation: blink 1s step-end infinite;
    color: var(--cyan);
    font-weight: 300;
}

.hero-sub {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 580px;
}

.hero-sub strong {
    color: var(--text);
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--cyan);
    color: var(--bg);
    border-color: var(--cyan);
}

.btn-primary:hover {
    background: #67e8f9;
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.35);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border-hl);
}

.btn-ghost:hover {
    background: var(--cyan-dim);
    color: var(--cyan);
    border-color: var(--cyan);
    transform: translateY(-2px);
}

.hero-social {
    display: flex;
    gap: 14px;
}

.hero-social a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 1rem;
    text-decoration: none;
    transition: all var(--transition);
    background: var(--surface);
}

.hero-social a:hover {
    color: var(--cyan);
    border-color: var(--border-hl);
    background: var(--cyan-dim);
    transform: translateY(-3px);
}

.hero-scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-dim);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    animation: scrollBounce 2s ease-in-out infinite;
}

/* ─────────────────────────────────────────
   SECTIONS
───────────────────────────────────────── */
.section {
    padding: 120px 0;
}

.section:nth-child(even) {
    background: var(--bg-alt);
}

.section-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cyan);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-label .mono {
    opacity: 0.7;
}

.section-heading {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 64px;
}

/* ─────────────────────────────────────────
   ABOUT
───────────────────────────────────────── */
.about-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 64px;
    align-items: flex-start;
}

.about-photo-wrap {
    position: sticky;
    top: calc(var(--nav-h) + 24px);
    position: relative;
    width: 240px;
    height: 240px;
}

.about-photo-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 4s ease-in-out infinite;
}

.about-photo {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-hl);
    box-shadow: 0 0 50px rgba(34, 211, 238, 0.15);
    z-index: 1;
}

.about-bio {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 20px;
}

.about-bio strong {
    color: var(--text);
    font-weight: 600;
}

.skills-grid {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.skill-group-title {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--cyan);
    margin-bottom: 12px;
}

.skill-group-title i {
    margin-right: 6px;
    opacity: 0.8;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tags span {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 0.84rem;
    font-weight: 500;
    transition: all var(--transition);
}

.skill-tags span:hover {
    border-color: var(--border-hl);
    color: var(--cyan);
    background: var(--cyan-dim);
}

/* ─────────────────────────────────────────
   EXPERIENCE & EDUCATION
───────────────────────────────────────── */
.timeline-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.timeline-col-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 32px;
    letter-spacing: -0.01em;
}

.timeline-col-title i {
    color: var(--cyan);
    margin-right: 8px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 16px 1fr;
    gap: 0 20px;
    margin-bottom: 28px;
}

.tl-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border-hl);
    margin-top: 4px;
    flex-shrink: 0;
    position: relative;
    transition: all var(--transition);
}

.tl-dot::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: calc(100% + 24px);
    background: var(--border);
}

.timeline-item:last-child .tl-dot::after {
    display: none;
}

.timeline-item:hover .tl-dot {
    background: var(--cyan);
    border-color: var(--cyan);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
}

.tl-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all var(--transition);
}

.tl-card:hover {
    border-color: var(--border-hl);
    transform: translateX(4px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.tl-period {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--cyan);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.tl-period i {
    margin-right: 5px;
    opacity: 0.7;
}

.tl-role {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.tl-company {
    font-size: 0.87rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.tl-company i {
    opacity: 0.6;
    margin-right: 4px;
}

.tl-type {
    background: var(--cyan-dim);
    color: var(--cyan);
    border: 1px solid var(--border-hl);
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tl-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 14px;
}

.tl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tl-tags span {
    background: rgba(129, 140, 248, 0.1);
    color: var(--indigo);
    border: 1px solid rgba(129, 140, 248, 0.25);
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* ─────────────────────────────────────────
   PROJECTS
───────────────────────────────────────── */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.project-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}

.project-card--reverse {
    direction: rtl;
}

.project-card--reverse > * {
    direction: ltr;
}

.project-media {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border: 1px solid var(--border);
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.6s ease, filter 0.4s ease;
    filter: brightness(0.85) saturate(0.9);
}

.project-card:hover .project-img {
    transform: scale(1.04);
    filter: brightness(1) saturate(1);
}

.project-media-overlay {
    position: absolute;
    inset: 0;
    background: rgba(6, 10, 16, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-media-overlay {
    opacity: 1;
}

.project-visit {
    background: var(--cyan);
    color: var(--bg);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition);
}

.project-visit:hover {
    background: #67e8f9;
    transform: scale(1.05);
}

.project-number {
    font-size: 0.78rem;
    color: var(--cyan);
    font-weight: 600;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
    opacity: 0.7;
}

.project-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.15;
}

.project-url {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--cyan);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 20px;
    transition: color var(--transition);
}

.project-url:hover {
    color: #67e8f9;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.97rem;
    line-height: 1.85;
    margin-bottom: 24px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tags span {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 5px 13px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
}

/* ─────────────────────────────────────────
   CONTACT
───────────────────────────────────────── */
.contact-inner {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
}

.contact-intro {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.85;
    max-width: 500px;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--cyan);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.01em;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
    transition: all var(--transition);
}

.contact-email:hover {
    border-bottom-color: var(--cyan);
}

.contact-email i {
    opacity: 0.7;
}

.contact-row {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.contact-detail i {
    color: var(--cyan);
    opacity: 0.7;
    width: 16px;
}

.contact-social {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.contact-social a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 11px 22px;
    border-radius: 9px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
}

.contact-social a:hover {
    color: var(--cyan);
    border-color: var(--border-hl);
    background: var(--cyan-dim);
    transform: translateY(-2px);
}

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
}

.footer .container {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.footer .mono {
    color: var(--text-muted);
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 1000px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-photo-col {
        display: flex;
        justify-content: center;
    }

    .timeline-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .project-card,
    .project-card--reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .section {
        padding: 80px 0;
    }

    .hero-name {
        font-size: clamp(2.8rem, 12vw, 4.5rem);
    }

    .contact-inner {
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        justify-content: center;
    }

    .footer .container {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
}