:root {
    --bg: #090b0e;
    --bg-alt: #0e1117;
    --surface: #131720;
    --surface-hover: #181d29;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --accent: #2dd4bf;
    --accent-secondary: #38bdf8;
    --accent-glow: rgba(45, 212, 191, 0.15);
    --award: #fbbf24;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius: 14px;
    --radius-sm: 8px;
    --transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Subtle architectural grid & ambient glow */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 40%, transparent 100%);
    pointer-events: none;
    z-index: -2;
}

.bg-glow {
    position: fixed;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    filter: blur(130px);
    opacity: 0.14;
    pointer-events: none;
    z-index: -1;
}

.bg-glow-1 {
    top: -180px;
    left: -120px;
    background: var(--accent);
}

.bg-glow-2 {
    bottom: 10%;
    right: -160px;
    background: var(--accent-secondary);
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.1rem 0;
    transition: background-color var(--transition), border-color var(--transition), padding var(--transition);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(9, 11, 14, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--border);
    padding: 0.8rem 0;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.brand-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
}

.mono-muted {
    font-family: var(--font-mono);
    font-size: 0.85em;
    color: var(--text-muted);
    font-weight: 400;
}

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

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.78rem 1.4rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
}

.btn-sm {
    padding: 0.45rem 0.95rem;
    font-size: 0.84rem;
    font-family: var(--font-mono);
}

.btn-primary {
    background: var(--accent);
    color: #041311;
}

.btn-primary:hover {
    background: #5eead4;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45, 212, 191, 0.25);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border-strong);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border-color: rgba(45, 212, 191, 0.4);
}

.btn-outline:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 7.5rem 0 4.5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    align-items: center;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(45, 212, 191, 0.08);
    border: 1px solid rgba(45, 212, 191, 0.22);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(45, 212, 191, 0); }
    100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0); }
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5.5vw, 4.3rem);
    line-height: 1.06;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.gradient-text {
    background: linear-gradient(120deg, var(--accent) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 560px;
    margin-bottom: 2rem;
}

.hero-subtitle strong {
    color: var(--text);
    font-weight: 600;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.75rem;
}

.hero-metrics {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric-value {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
}

.metric-label {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.metric-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
}

/* Terminal Card */
.terminal-window {
    background: #0c0f15;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #131722;
    border-bottom: 1px solid var(--border);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.terminal-copy {
    background: transparent;
    border: 0;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    transition: color var(--transition);
}

.terminal-copy:hover {
    color: var(--accent);
}

.terminal-body {
    padding: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.81rem;
    line-height: 1.65;
    overflow-x: auto;
}

.term-line {
    color: var(--text);
    margin-bottom: 0.5rem;
}

.prompt {
    color: var(--accent);
    margin-right: 0.5rem;
    font-weight: 600;
}

.term-output pre {
    margin: 0 0 0.75rem;
    font-family: inherit;
}

.yaml-key {
    color: #38bdf8;
}

.yaml-str {
    color: #a7f3d0;
}

.cursor {
    animation: blink 1.1s step-end infinite;
    color: var(--accent);
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Sections */
.section {
    padding: 6rem 0;
}

.section-alt {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-header {
    max-width: 680px;
    margin-bottom: 3.25rem;
}

.section-header-flex {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
    letter-spacing: 0.08em;
    margin-bottom: 0.6rem;
}

.section h2 {
    font-family: var(--font-display);
    font-size: clamp(1.85rem, 3.5vw, 2.5rem);
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.03rem;
    margin-bottom: 1.25rem;
}

.about-text strong {
    color: var(--text);
    font-weight: 600;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.highlight-card {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition), transform var(--transition);
}

.highlight-card:hover {
    border-color: var(--border-strong);
    transform: translateX(4px);
}

.highlight-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-glow);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-size: 1rem;
}

.highlight-card h4 {
    font-family: var(--font-display);
    font-size: 1.02rem;
    margin-bottom: 0.25rem;
}

.highlight-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 1px solid var(--border-strong);
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
}

.timeline-item {
    position: relative;
}

.timeline-marker {
    position: absolute;
    left: -2.42rem;
    top: 0.35rem;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg-alt);
    box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.3);
}

.timeline-marker.accent {
    background: var(--award);
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.3);
}

.timeline-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.timeline-badge {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
}

.badge-primary {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.badge-award {
    background: rgba(251, 191, 36, 0.12);
    color: var(--award);
    border: 1px solid rgba(251, 191, 36, 0.28);
}

.timeline-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.65rem;
    transition: border-color var(--transition);
}

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

.timeline-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 0.2rem;
}

.card-org {
    font-size: 0.92rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 1rem;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.1rem;
}

.card-desc strong,
.clean-list strong {
    color: var(--text);
    font-weight: 600;
}

.clean-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.clean-list li {
    position: relative;
    padding-left: 1.15rem;
    color: var(--text-muted);
    font-size: 0.94rem;
}

.clean-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent);
}

.clean-list.compact li {
    font-size: 0.89rem;
}

/* Tags */
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

/* Projects Filter & Bento Grid */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    background: var(--surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all var(--transition);
}

.filter-btn:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

.filter-btn.active {
    background: var(--accent);
    color: #041311;
    border-color: var(--accent);
    font-weight: 600;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(45, 212, 191, 0.35);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.project-card.hidden {
    display: none;
}

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.76rem;
}

.project-period {
    color: var(--text-dim);
}

.project-role {
    color: var(--accent);
}

.project-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 0.65rem;
    line-height: 1.3;
}

.project-summary {
    color: var(--text);
    font-size: 0.94rem;
    margin-bottom: 1rem;
    opacity: 0.92;
}

.project-card .tag-row {
    margin-top: auto;
    padding-top: 0.5rem;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.skill-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.65rem;
}

.skill-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.15rem;
}

.skill-card-header i {
    color: var(--accent);
    font-size: 1.1rem;
}

.skill-card-header h3 {
    font-family: var(--font-display);
    font-size: 1.12rem;
}

.skill-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.skill-pills span {
    font-size: 0.86rem;
    padding: 0.38rem 0.78rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    transition: all var(--transition);
}

.skill-pills span:hover {
    color: var(--text);
    border-color: var(--accent);
}

/* Education & Certs */
.edu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.col-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
}

.col-title i {
    color: var(--accent);
}

.edu-column {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
}

.info-date {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--accent);
    margin-bottom: 0.35rem;
}

.info-card h4 {
    font-family: var(--font-display);
    font-size: 1.08rem;
    margin-bottom: 0.25rem;
}

.info-sub {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.info-detail {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Contact */
.contact-box {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 2.5rem;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    padding: 2.75rem;
}

.contact-copy h2 {
    margin-bottom: 0.85rem;
}

.contact-copy p {
    color: var(--text-muted);
    font-size: 0.98rem;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
}

.contact-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.contact-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--accent-glow);
    color: var(--accent);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.contact-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-dim);
}

.contact-val {
    font-size: 0.86rem;
    font-weight: 500;
    word-break: break-word;
}

/* Footer */
.footer {
    padding: 2.25rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.84rem;
    color: var(--text-dim);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: var(--delay, 0s);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 960px) {
    .hero-grid,
    .about-grid,
    .contact-box {
        grid-template-columns: 1fr;
    }

    .projects-grid,
    .skills-grid,
    .edu-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 64px;
        left: 1rem;
        right: 1rem;
        background: var(--surface);
        border: 1px solid var(--border-strong);
        border-radius: var(--radius);
        flex-direction: column;
        align-items: stretch;
        padding: 1.25rem;
        gap: 0.85rem;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: all var(--transition);
    }

    .nav-links.open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .contact-cards {
        grid-template-columns: 1fr;
    }

    .contact-box {
        padding: 1.75rem;
    }
}
