/* ============================================================
   Variables
   ============================================================ */
:root {
    --bg:           #080c14;
    --bg-2:         #0c1120;
    --bg-card:      #111827;
    --text:         #e2e8f0;
    --text-muted:   #64748b;
    --accent:       #06b6d4;
    --accent-2:     #22d3ee;
    --accent-glow:  rgba(6, 182, 212, 0.1);
    --accent-dim:   rgba(6, 182, 212, 0.15);
    --border:       #1e293b;
    --radius:       12px;
    --max-w:        960px;
    --font-sans:    'Inter', -apple-system, sans-serif;
    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', monospace;
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    background-image: radial-gradient(circle, rgba(6, 182, 212, 0.025) 1px, transparent 1px);
    background-size: 28px 28px;
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
}

h1, h2, h3 { font-family: var(--font-display); }
strong { color: var(--text); font-weight: 600; }

/* ============================================================
   Nav
   ============================================================ */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(8, 12, 20, 0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: var(--text);
    transition: color 0.2s;
}
.nav-logo:hover { color: var(--accent); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
    position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0; right: 0;
    height: 1px;
    background: var(--accent);
}

.nav-cta {
    padding: 0.375rem 0.9rem;
    border: 1px solid var(--accent-dim);
    border-radius: 6px;
    color: var(--accent) !important;
}
.nav-cta:hover {
    background: var(--accent-glow);
    color: var(--accent-2) !important;
}

/* ============================================================
   Hero
   ============================================================ */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 7rem 2rem 5rem;
    background: radial-gradient(ellipse 80% 60% at 10% 50%, rgba(6, 182, 212, 0.06) 0%, transparent 70%);
}

#heroCanvas {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    opacity: 0.45;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: var(--max-w);
    margin: 0 auto;
    width: 100%;
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    animation: fadeUp 0.6s ease 0.1s both;
}
.hero-label::before {
    content: '';
    display: inline-block;
    width: 2rem;
    height: 1px;
    background: var(--accent);
}

.hero-name {
    font-size: clamp(4.5rem, 13vw, 8.5rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.04em;
    margin-bottom: 1.75rem;
    background: linear-gradient(135deg, var(--text) 50%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeUp 0.6s ease 0.25s both;
}

.hero-summary {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 560px;
    line-height: 1.85;
    margin-bottom: 2.5rem;
    animation: fadeUp 0.6s ease 0.4s both;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    animation: fadeUp 0.6s ease 0.55s both;
}

.stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.1;
}
.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.stat-div {
    width: 1px;
    height: 36px;
    background: var(--border);
    flex-shrink: 0;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    animation: fadeUp 0.6s ease 0.65s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: var(--font-sans);
}
.btn-primary {
    background: var(--accent);
    color: #000;
}
.btn-primary:hover {
    background: var(--accent-2);
    box-shadow: 0 4px 24px rgba(6, 182, 212, 0.35);
    transform: translateY(-1px);
}
.btn-ghost {
    border: 1px solid var(--border);
    color: var(--text-muted);
    background: transparent;
}
.btn-ghost:hover {
    border-color: var(--accent-dim);
    color: var(--text);
    background: var(--accent-glow);
}

.scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-muted);
    opacity: 0.4;
    animation: bob 2.2s ease-in-out infinite;
    z-index: 1;
    transition: opacity 0.2s;
}
.scroll-hint:hover { opacity: 0.8; }

@keyframes bob {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(7px); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Sections (shared)
   ============================================================ */
.section {
    padding: 6rem 2rem;
}

.fade-up {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-inner {
    max-width: var(--max-w);
    margin: 0 auto;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ============================================================
   Tags
   ============================================================ */
.tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 0.28rem 0.65rem;
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.14);
    border-radius: 4px;
    color: var(--text-muted);
    transition: all 0.2s;
    cursor: default;
}
.tag:hover {
    background: var(--accent-glow);
    border-color: var(--accent-dim);
    color: var(--accent-2);
}
.tag-accent {
    color: var(--accent);
    border-color: var(--accent-dim);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ============================================================
   Experience / Timeline
   ============================================================ */
#experience { background: var(--bg-2); }

.timeline {
    position: relative;
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent 0%, var(--accent) 10%, var(--accent-2) 90%, transparent 100%);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.45), 0 0 24px rgba(6, 182, 212, 0.15);
}

.timeline-item {
    position: relative;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(2px - 1.5rem);
    top: 1.6rem;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15), 0 0 12px rgba(6, 182, 212, 0.7);
    z-index: 1;
}

.tl-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.5s ease;
}
.tl-card:hover {
    border-color: var(--accent-dim);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    transform: translateY(-4px);
}

.tl-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}
.tl-role {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.2rem;
}
.tl-company {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}
.tl-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    flex-shrink: 0;
}
.tl-badge {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    padding: 0.2rem 0.55rem;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid var(--accent-dim);
    border-radius: 4px;
    color: var(--accent);
    white-space: nowrap;
}
.tl-date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.tl-bullets {
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
}
.tl-bullets li {
    font-size: 0.9rem;
    color: var(--text-muted);
    position: relative;
    line-height: 1.65;
}
.tl-bullets li::before {
    content: '▸';
    position: absolute;
    left: -1.25rem;
    top: 0.18rem;
    color: var(--accent);
    font-size: 0.72rem;
}

/* ============================================================
   Skills — Bento Grid
   ============================================================ */
.bento {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.bento-wide { grid-column: span 2; }

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.5s ease;
}
.bento-card:hover {
    border-color: var(--accent-dim);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.bento-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
}

/* ============================================================
   Education
   ============================================================ */
#education { background: var(--bg-2); }

.edu-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.5s ease;
}
.edu-card:hover {
    border-color: var(--accent-dim);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.edu-degree {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}
.edu-school {
    font-size: 0.875rem;
    color: var(--accent);
    font-weight: 500;
}
.edu-year {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ============================================================
   Contact
   ============================================================ */
.contact-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-heading {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}
.contact-sub {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

.contact-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 1.25rem 1.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 190px;
    transition: all 0.25s ease;
}
.contact-card:hover {
    border-color: var(--accent-dim);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.contact-card-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.contact-card-value {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================================
   Footer
   ============================================================ */
footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}
.footer-dot { opacity: 0.4; }

/* ============================================================
   Scroll to Top
   ============================================================ */
.scroll-top {
    position: fixed;
    bottom: 2rem; right: 2rem;
    width: 44px; height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0;
    transform: translateY(16px);
    transition: all 0.3s ease;
    z-index: 99;
}
.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
}
.scroll-top:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 640px) {
    .bento                   { grid-template-columns: 1fr; }
    .bento-wide              { grid-column: span 1; }
    .hero-stats              { gap: 1.25rem; }
    .stat-div                { display: none; }
    .tl-header               { flex-direction: column; }
    .tl-right                { align-items: flex-start; }
    .edu-card                { flex-direction: column; align-items: flex-start; }
    .nav-links               { gap: 1rem; }
    .nav-links a             { font-size: 0.8rem; }
    .contact-grid            { flex-direction: column; align-items: stretch; }
    .contact-card            { min-width: unset; }
}
