/* ============================================================
   Deepak Raj — Portfolio
   Apple-inspired premium redesign
   ============================================================ */

:root {
    /* Palette — deep black, off-white, restrained security-green accent */
    --bg: #000000;
    --bg-elev: #0b0b0d;
    --surface: rgba(255, 255, 255, 0.045);
    --surface-2: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.18);

    --text: #f5f5f7;
    --text-dim: #a1a1aa;
    --text-faint: #6e6e78;

    --accent: #30d158;          /* Apple-esque green */
    --accent-2: #64d2ff;        /* cyan */
    --accent-soft: rgba(48, 209, 88, 0.14);

    --radius: 20px;
    --radius-sm: 12px;

    /* Apple's signature "easeOutExpo"-style curves */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
    --transition: all 0.4s var(--ease);

    --maxw: 1120px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    --font-mono: 'Fira Code', 'SF Mono', ui-monospace, monospace;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

/* Ambient aura behind everything — gives the glass colour to refract */
body::before {
    content: '';
    position: fixed;
    inset: -10%;
    z-index: -3;
    background:
        radial-gradient(560px circle at 12% 18%, rgba(48, 209, 88, 0.12), transparent 55%),
        radial-gradient(680px circle at 88% 72%, rgba(100, 210, 255, 0.11), transparent 55%),
        radial-gradient(520px circle at 62% 42%, rgba(130, 120, 255, 0.08), transparent 55%);
    animation: aura 26s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes aura {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(3%, -2%, 0) scale(1.08); }
    100% { transform: translate3d(-3%, 3%, 0) scale(1.04); }
}

::selection {
    background: var(--accent-soft);
    color: var(--text);
}

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

a { color: inherit; }

/* ---------- Reveal-on-scroll base ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
    will-change: opacity, transform;
}
[data-reveal].revealed {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
    .blob, .terminal-window { animation: none !important; }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem 1.7rem;
    border-radius: 980px;
    font-size: 0.98rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    font-family: inherit;
}
.btn-primary {
    background-color: var(--accent);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 55%);
    color: #04120a;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 6px 20px rgba(48, 209, 88, 0.25);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 34px rgba(48, 209, 88, 0.35);
    filter: brightness(1.05);
}
.btn-ghost {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 55%),
        var(--surface);
    color: var(--text);
    border-color: var(--border-strong);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-ghost:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
    transform: translateY(-2px);
}
.btn-ghost i { transition: transform 0.4s var(--ease); }
.btn-ghost:hover i { transform: translateX(4px); }

/* ============================================================
   Navigation
   ============================================================ */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.9rem 0;
    background: transparent;
    transition: background 0.5s var(--ease), border-color 0.5s var(--ease), padding 0.5s var(--ease);
    border-bottom: 1px solid transparent;
}
.navbar.scrolled {
    background: rgba(8, 8, 10, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0.65rem 0;
}
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
}
.terminal-prompt { color: var(--accent); }
.brand-text { color: var(--text); }

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.1rem;
    align-items: center;
}
.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); }
.nav-link:not(.nav-cta)::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    transition: width 0.4s var(--ease);
}
.nav-link:not(.nav-cta):hover::after,
.nav-link.active:not(.nav-cta)::after { width: 100%; }

.nav-cta {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.5rem 1.15rem;
    border-radius: 980px;
    color: var(--text);
}
.nav-cta:hover {
    background: var(--accent);
    color: #04120a;
    border-color: var(--accent);
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.hamburger span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
}
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    will-change: transform;
}
.blob-1 {
    width: 620px; height: 620px;
    top: -180px; left: -120px;
    background: radial-gradient(circle, rgba(48, 209, 88, 0.35), transparent 68%);
    animation: drift1 18s ease-in-out infinite;
}
.blob-2 {
    width: 560px; height: 560px;
    bottom: -160px; right: -120px;
    background: radial-gradient(circle, rgba(100, 210, 255, 0.28), transparent 68%);
    animation: drift2 22s ease-in-out infinite;
}
@keyframes drift1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 40px) scale(1.1); }
}
@keyframes drift2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-50px, -30px) scale(1.08); }
}
.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 100%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 860px;
    width: 100%;
}
.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.2rem;
}
.hero-title {
    font-size: clamp(3rem, 9vw, 6.5rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.04em;
    margin-bottom: 1.4rem;
    background: linear-gradient(180deg, #ffffff 30%, #b9b9c2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-lead {
    font-size: clamp(1.1rem, 2.2vw, 1.45rem);
    color: var(--text-dim);
    max-width: 620px;
    margin: 0 auto 2.2rem;
    line-height: 1.5;
    font-weight: 400;
}
.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

/* Terminal card */
.terminal-window {
    max-width: 560px;
    margin: 0 auto;
    background: rgba(18, 18, 22, 0.82);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-align: left;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(20px);
    animation: floaty 7s ease-in-out infinite;
}
@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.terminal-header {
    background: rgba(255, 255, 255, 0.04);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
}
.terminal-button {
    width: 12px; height: 12px;
    border-radius: 50%;
}
.terminal-button.red { background: #ff5f56; }
.terminal-button.yellow { background: #ffbd2e; }
.terminal-button.green { background: #27c93f; }
.terminal-title {
    margin-left: 10px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-faint);
}
.terminal-body {
    padding: 22px;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    background: rgba(0, 0, 0, 0.35);
}
.terminal-line {
    margin: 8px 0;
    color: var(--text);
}
.terminal-line.response {
    color: var(--accent);
    margin-left: 18px;
}
.prompt { color: var(--accent-2); font-weight: 600; }
.command { color: var(--text); }
.blink { animation: blink 1.1s steps(2, start) infinite; color: var(--accent); }
@keyframes blink { to { opacity: 0; } }

/* Scroll cue */
.scroll-cue {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 40px;
    border: 2px solid var(--border-strong);
    border-radius: 14px;
    z-index: 1;
}
.scroll-cue span {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px; height: 8px;
    margin-left: -2px;
    background: var(--accent);
    border-radius: 3px;
    animation: scrollcue 1.8s var(--ease) infinite;
}
@keyframes scrollcue {
    0% { opacity: 0; transform: translateY(0); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: translateY(14px); }
}

/* ============================================================
   Sections
   ============================================================ */
section {
    padding: 120px 0;
    position: relative;
}
.section-title {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    text-align: center;
    margin-bottom: 4rem;
    background: linear-gradient(180deg, #ffffff, #c8c8d0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------- Stats strip ---------- */
.stats-strip {
    padding: 40px 0 100px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.4rem 1.5rem;
    text-align: center;
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    background: var(--surface-2);
}
.stat-card h3 {
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.4rem;
}
.stat-card p {
    color: var(--text-dim);
    font-size: 0.92rem;
}

/* ---------- About ---------- */
.about-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3.5rem;
    align-items: start;
}
.about-text { display: flex; flex-direction: column; gap: 1.4rem; }
.about-text p {
    color: var(--text-dim);
    font-size: 1.05rem;
    line-height: 1.75;
}
.about-text strong { color: var(--text); font-weight: 600; }

.social-links { display: flex; gap: 1rem; margin-top: 0.8rem; }
.social-links a {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-dim);
    font-size: 1.15rem;
    transition: var(--transition);
}
.social-links a:hover {
    background: var(--accent);
    color: #04120a;
    border-color: var(--accent);
    transform: translateY(-4px);
}

.about-highlights { display: flex; flex-direction: column; gap: 1rem; }
.highlight-item {
    background: var(--surface);
    padding: 1.5rem 1.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.highlight-item:hover {
    transform: translateX(8px);
    border-color: var(--border-strong);
    background: var(--surface-2);
}
.highlight-item i {
    color: var(--accent);
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
}
.highlight-item h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.35rem; }
.highlight-item p { color: var(--text-dim); font-size: 0.9rem; }

/* ---------- Experience / Timeline ---------- */
.timeline {
    position: relative;
    max-width: 780px;
    margin: 0 auto;
    padding-left: 32px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2), transparent);
}
.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}
.timeline-marker {
    position: absolute;
    left: -32px;
    top: 26px;
    width: 16px; height: 16px;
    background: var(--accent);
    border: 3px solid var(--bg);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--accent-soft);
}
.timeline-content {
    background: var(--surface);
    padding: 1.8rem 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.timeline-content:hover {
    border-color: var(--border-strong);
    background: var(--surface-2);
    transform: translateY(-4px);
}
.timeline-content h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.25rem; }
.timeline-content .company { color: var(--accent-2); font-weight: 500; font-size: 0.95rem; }
.timeline-content .date {
    color: var(--text-faint);
    font-size: 0.82rem;
    font-family: var(--font-mono);
    margin-bottom: 1rem;
}
.timeline-content ul { list-style: none; }
.timeline-content li {
    color: var(--text-dim);
    margin: 0.5rem 0;
    padding-left: 1.4rem;
    position: relative;
    font-size: 0.92rem;
}
.timeline-content li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

/* ---------- Projects ---------- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.8rem;
}
.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(48,209,88,0.08), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
    pointer-events: none;
}
.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-strong);
}
.project-card:hover::after { opacity: 1; }
.project-header { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1rem; }
.project-header i {
    font-size: 1.4rem;
    color: var(--accent);
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-soft);
    border-radius: 12px;
}
.project-header h3 { font-size: 1.2rem; font-weight: 600; }
.project-description { color: var(--text-dim); margin-bottom: 1rem; font-size: 0.95rem; }
.project-features { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.tag {
    background: var(--surface-2);
    color: var(--text-dim);
    padding: 0.3rem 0.8rem;
    border-radius: 980px;
    font-size: 0.75rem;
    border: 1px solid var(--border);
}
.project-details { color: var(--text-faint); font-size: 0.86rem; margin: 1rem 0; line-height: 1.6; }
.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.6rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    position: relative;
    z-index: 1;
}
.project-link i { transition: transform 0.4s var(--ease); }
.project-link:hover i { transform: translateX(5px); }

/* ---------- Skills ---------- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
.skill-category {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.skill-category:hover {
    border-color: var(--border-strong);
    background: var(--surface-2);
    transform: translateY(-4px);
}
.skill-category h3 {
    color: var(--text);
    margin-bottom: 1.3rem;
    font-size: 1.05rem;
    font-weight: 600;
}
.skill-list { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.skill {
    background: var(--surface-2);
    color: var(--text-dim);
    padding: 0.5rem 0.95rem;
    border-radius: 980px;
    font-size: 0.82rem;
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: default;
}
.skill:hover {
    background: var(--accent);
    color: #04120a;
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* ---------- Achievements ---------- */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}
.achievement-card {
    background: var(--surface);
    padding: 2.2rem 1.8rem;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border);
    transition: var(--transition);
}
.achievement-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-strong);
    background: var(--surface-2);
}
.achievement-card i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
    width: 64px; height: 64px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-soft);
    border-radius: 50%;
}
.achievement-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; }
.achievement-card p { color: var(--text-dim); font-size: 0.9rem; }

/* ---------- Contact ---------- */
.contact-content {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 2.5rem;
}
.contact-info { display: flex; flex-direction: column; gap: 1.2rem; }
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.contact-item:hover { transform: translateX(8px); border-color: var(--border-strong); }
.contact-item i {
    color: var(--accent);
    font-size: 1.2rem;
    margin-top: 0.2rem;
}
.contact-item h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.25rem; }
.contact-item a, .contact-item p { color: var(--text-dim); text-decoration: none; font-size: 0.92rem; transition: color 0.3s var(--ease); }
.contact-item a:hover { color: var(--accent); }

.contact-form-wrapper {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }
.form-group { display: flex; flex-direction: column; }
.form-group input,
.form-group textarea {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.95rem 1.1rem;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    resize: vertical;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-faint); }
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.btn-submit { justify-content: center; margin-top: 0.4rem; }

/* ---------- Footer ---------- */
.footer {
    background: var(--bg-elev);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}
.footer-section h4 { color: var(--text); margin-bottom: 1rem; font-size: 1rem; }
.footer-section p, .footer-section a { color: var(--text-dim); text-decoration: none; font-size: 0.9rem; transition: color 0.3s var(--ease); }
.footer-section a:hover { color: var(--accent); }
.footer-section ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.social-icons { display: flex; gap: 0.8rem; }
.social-icons a {
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-dim);
    transition: var(--transition);
}
.social-icons a:hover {
    background: var(--accent);
    color: #04120a;
    border-color: var(--accent);
    transform: translateY(-3px);
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-faint);
    font-size: 0.85rem;
}

/* ---------- Scroll-to-top ---------- */
.scroll-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface-2);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 998;
    opacity: 0;
    transform: translateY(16px) scale(0.9);
    pointer-events: none;
    transition: var(--transition);
}
.scroll-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.scroll-top:hover { background: var(--accent); color: #04120a; border-color: var(--accent); }

/* ---------- Notification ---------- */
.toast {
    position: fixed;
    top: 90px;
    right: 24px;
    background: var(--surface-2);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-strong);
    color: var(--text);
    padding: 1rem 1.3rem;
    border-radius: var(--radius-sm);
    z-index: 2000;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    .about-content,
    .contact-content { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 768px) {
    section { padding: 90px 0; }
    .hamburger { display: flex; }

    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(78vw, 320px);
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        gap: 1.6rem;
        padding: 2rem 2.4rem;
        background: rgba(8, 8, 10, 0.92);
        backdrop-filter: blur(24px);
        border-left: 1px solid var(--border);
        transform: translateX(100%);
        transition: transform 0.5s var(--ease);
    }
    .nav-menu.open { transform: translateX(0); }
    .nav-link { font-size: 1.15rem; }

    .stats-grid { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; width: 100%; max-width: 300px; margin-inline: auto; margin-bottom: 3rem; }
    .hero-cta .btn { justify-content: center; }
}

@media (max-width: 480px) {
    .container { padding: 0 18px; }
    .terminal-body { font-size: 0.78rem; }
    .achievements-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Liquid Glass
   Frosted refraction · chromatic refractive rim ·
   cursor-tracking glare · sweeping reflection · dramatic tilt
   ============================================================ */
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.stat-card,
.highlight-item,
.timeline-content,
.project-card,
.skill-category,
.achievement-card,
.contact-item,
.contact-form-wrapper {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.015) 60%);
    backdrop-filter: blur(26px) saturate(185%) contrast(1.05);
    -webkit-backdrop-filter: blur(26px) saturate(185%) contrast(1.05);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow:
        0 14px 48px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.26),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 -22px 44px rgba(0, 0, 0, 0.22);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transform-style: preserve-3d;
}

/* Keep real content above the light layers */
.stat-card > *,
.highlight-item > *,
.timeline-content > *,
.skill-category > *,
.achievement-card > *,
.contact-form-wrapper > *,
.project-card > *:not(.sheen) {
    position: relative;
    z-index: 5;
}

/* Chromatic refractive rim — the "liquid glass" edge (::before) */
.stat-card::before,
.highlight-item::before,
.timeline-content::before,
.project-card::before,
.skill-category::before,
.achievement-card::before,
.contact-form-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: conic-gradient(from var(--angle),
        rgba(100, 210, 255, 0.0)  0deg,
        rgba(100, 210, 255, 0.7)  55deg,
        rgba(48, 209, 88, 0.55)  120deg,
        rgba(255, 255, 255, 0.9)  180deg,
        rgba(48, 209, 88, 0.55)  240deg,
        rgba(100, 210, 255, 0.7)  305deg,
        rgba(100, 210, 255, 0.0)  360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0.4;
    transition: opacity 0.5s var(--ease);
    pointer-events: none;
    z-index: 6;
}
.stat-card:hover::before,
.highlight-item:hover::before,
.timeline-content:hover::before,
.project-card:hover::before,
.skill-category:hover::before,
.achievement-card:hover::before,
.contact-form-wrapper:hover::before {
    opacity: 1;
    animation: rim-rotate 5s linear infinite;
}
@keyframes rim-rotate { to { --angle: 360deg; } }

/* Cursor-tracking specular glare (::after) */
.stat-card::after,
.highlight-item::after,
.timeline-content::after,
.project-card::after,
.skill-category::after,
.achievement-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%),
        rgba(255, 255, 255, 0.32),
        rgba(255, 255, 255, 0.09) 32%,
        transparent 62%);
    opacity: 0;
    transition: opacity 0.35s var(--ease);
    pointer-events: none;
    mix-blend-mode: screen;
    z-index: 3;
}
.stat-card:hover::after,
.highlight-item:hover::after,
.timeline-content:hover::after,
.project-card:hover::after,
.skill-category:hover::after,
.achievement-card:hover::after {
    opacity: 1;
}

/* Sweeping reflection (injected .sheen span) */
.sheen {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(125deg, transparent 33%, rgba(255, 255, 255, 0.22) 47%, rgba(255, 255, 255, 0.05) 53%, transparent 67%);
    transform: translateX(-135%);
    transition: transform 0.9s var(--ease);
    pointer-events: none;
    z-index: 4;
}
[data-tilt]:hover .sheen { transform: translateX(135%); }

/* Glassier terminal with a curved reflection across the top */
.terminal-window {
    background: linear-gradient(135deg, rgba(30, 30, 38, 0.72), rgba(12, 12, 16, 0.82));
    backdrop-filter: blur(26px) saturate(150%);
    -webkit-backdrop-filter: blur(26px) saturate(150%);
    box-shadow:
        0 40px 90px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
}
.terminal-window::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
    border-radius: var(--radius) var(--radius) 50% 50% / var(--radius) var(--radius) 22px 22px;
    pointer-events: none;
    z-index: 1;
}
.terminal-body { position: relative; z-index: 2; }

/* Frosted nav */
.navbar.scrolled {
    background: rgba(8, 8, 10, 0.55);
    backdrop-filter: saturate(180%) blur(28px);
    -webkit-backdrop-filter: saturate(180%) blur(28px);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06), 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Tilt container — smooth return handled in JS */
[data-tilt] {
    transition: transform 0.55s var(--ease), box-shadow 0.55s var(--ease), border-color 0.4s var(--ease);
    will-change: transform;
}
[data-tilt]:hover {
    box-shadow:
        0 34px 80px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.06),
        inset 0 -22px 44px rgba(0, 0, 0, 0.22);
}

@media (prefers-reduced-motion: reduce) {
    body::before { animation: none; }
    [data-tilt] { transform: none !important; }
    .sheen,
    .stat-card::after, .highlight-item::after, .timeline-content::after,
    .project-card::after, .skill-category::after, .achievement-card::after { display: none; }
    .stat-card:hover::before, .highlight-item:hover::before, .timeline-content:hover::before,
    .project-card:hover::before, .skill-category:hover::before, .achievement-card:hover::before,
    .contact-form-wrapper:hover::before { animation: none; }
}

@media (max-width: 768px) {
    /* Lighten blur on mobile for performance */
    .stat-card, .highlight-item, .timeline-content, .project-card,
    .skill-category, .achievement-card, .contact-item, .contact-form-wrapper {
        backdrop-filter: blur(14px) saturate(150%);
        -webkit-backdrop-filter: blur(14px) saturate(150%);
    }
}

/* ============================================================
   Background FX — matrix rain + cursor spotlight
   ============================================================ */
.bg-fx {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
}
#matrix {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.14;
}
#spotlight {
    position: absolute;
    inset: 0;
    background: radial-gradient(520px circle at var(--sx, 50%) var(--sy, 28%),
        rgba(48, 209, 88, 0.12),
        rgba(100, 210, 255, 0.06) 35%,
        transparent 62%);
}
[data-theme="light"] #matrix { opacity: 0.06; }
[data-theme="light"] #spotlight {
    background: radial-gradient(520px circle at var(--sx, 50%) var(--sy, 28%),
        rgba(15, 157, 88, 0.1), transparent 60%);
}

/* ============================================================
   Preloader / boot sequence
   ============================================================ */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.preloader.done { opacity: 0; visibility: hidden; }
.boot { width: min(90vw, 480px); font-family: var(--font-mono); }
.boot-lines {
    color: var(--accent);
    font-size: 0.85rem;
    line-height: 1.75;
    white-space: pre-wrap;
    margin-bottom: 1.2rem;
    min-height: 150px;
    text-shadow: 0 0 12px rgba(48, 209, 88, 0.4);
}
.boot-bar {
    height: 3px;
    background: var(--surface-2);
    border-radius: 3px;
    overflow: hidden;
}
.boot-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 0.4s var(--ease);
}

/* ============================================================
   Scroll progress bar
   ============================================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 12px var(--accent);
    z-index: 1001;
}

/* ============================================================
   Theme toggle
   ============================================================ */
.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: var(--transition);
}
.theme-toggle:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
    transform: rotate(25deg);
}

/* ============================================================
   Interactive terminal
   ============================================================ */
.terminal-body { max-height: 340px; overflow-y: auto; scrollbar-width: thin; }
.terminal-body::-webkit-scrollbar { width: 6px; }
.terminal-body::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.terminal-line.hint { color: var(--text-faint); font-size: 0.8rem; margin-top: 12px; }
.terminal-input-line { display: flex; align-items: center; gap: 0.5rem; margin-top: 6px; }
.term-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #eaeaf2;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    caret-color: var(--accent);
    padding: 0;
}
/* Keep terminal readable regardless of theme */
.terminal-window .terminal-line,
.terminal-window .command { color: #eaeaf2; }

/* ============================================================
   Certifications strip
   ============================================================ */
.certs-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}
.cert-badge {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1.4rem;
    border-radius: 980px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
    backdrop-filter: blur(12px);
}
.cert-badge i { color: var(--accent); }
.cert-badge:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 12px 32px var(--accent-soft);
}

/* ============================================================
   Writeups / Blog
   ============================================================ */
.writeups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.8rem;
}
.writeup-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.9rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px) saturate(160%);
}
.writeup-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.writeup-tag {
    display: inline-block;
    font-size: 0.72rem;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.2rem 0.75rem;
    border-radius: 980px;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
}
.writeup-card h3 { font-size: 1.12rem; font-weight: 600; margin-bottom: 0.6rem; }
.writeup-card p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 1rem; line-height: 1.6; }
.writeup-link { color: var(--accent); font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 0.4rem; }
.writeup-link i { transition: transform 0.4s var(--ease); }
.writeup-card:hover .writeup-link i { transform: translateX(5px); }
.writeups-cta { text-align: center; margin-top: 2.6rem; }

/* ============================================================
   Light theme
   ============================================================ */
[data-theme="light"] {
    --bg: #f2f2f5;
    --bg-elev: #ffffff;
    --surface: rgba(0, 0, 0, 0.045);
    --surface-2: rgba(0, 0, 0, 0.075);
    --border: rgba(0, 0, 0, 0.1);
    --border-strong: rgba(0, 0, 0, 0.2);
    --text: #1d1d1f;
    --text-dim: #43434b;
    --text-faint: #86868b;
    --accent: #0f9d58;
    --accent-2: #0a84c4;
    --accent-soft: rgba(15, 157, 88, 0.12);
}
[data-theme="light"] .hero-title,
[data-theme="light"] .section-title,
[data-theme="light"] .stat-card h3 {
    background: linear-gradient(180deg, #1d1d1f, #4b4b52);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
[data-theme="light"] .stat-card h3 {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
[data-theme="light"] body::before { opacity: 0.7; }
[data-theme="light"] .stat-card,
[data-theme="light"] .highlight-item,
[data-theme="light"] .timeline-content,
[data-theme="light"] .project-card,
[data-theme="light"] .skill-category,
[data-theme="light"] .achievement-card,
[data-theme="light"] .contact-item,
[data-theme="light"] .contact-form-wrapper {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.45) 60%);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
[data-theme="light"] .navbar.scrolled {
    background: rgba(255, 255, 255, 0.65);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.06), 0 8px 30px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .btn-primary { color: #ffffff; }
[data-theme="light"] .skill:hover,
[data-theme="light"] .social-links a:hover,
[data-theme="light"] .social-icons a:hover,
[data-theme="light"] .nav-cta:hover,
[data-theme="light"] .cert-badge:hover { color: #ffffff; }

@media (max-width: 768px) {
    .writeups-grid { grid-template-columns: 1fr; }
    .theme-toggle { margin-top: 0.5rem; }
}

/* ============================================================
   Enhanced glass — deeper frost, gloss, frosted grain
   (overrides earlier definitions; appended last on purpose)
   ============================================================ */
:root {
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

/* Brighter ambient light so the glass has more to refract */
body::before {
    background:
        radial-gradient(600px circle at 12% 18%, rgba(48, 209, 88, 0.20), transparent 55%),
        radial-gradient(720px circle at 88% 72%, rgba(100, 210, 255, 0.18), transparent 55%),
        radial-gradient(560px circle at 62% 42%, rgba(140, 120, 255, 0.14), transparent 55%);
}
.blob-1, .blob-2 { opacity: 0.7; }

/* Frosted glass panes — gloss highlight + noise texture + deeper blur */
.stat-card,
.highlight-item,
.timeline-content,
.project-card,
.skill-category,
.achievement-card,
.contact-item,
.contact-form-wrapper,
.writeup-card {
    background-image:
        var(--grain),
        linear-gradient(180deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0) 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02) 62%);
    background-size: 150px 150px, 100% 100%, 100% 100%;
    background-blend-mode: overlay, normal, normal;
    background-color: transparent;
    backdrop-filter: blur(32px) saturate(200%) brightness(1.08);
    -webkit-backdrop-filter: blur(32px) saturate(200%) brightness(1.08);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow:
        0 16px 52px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        inset 0 0 0 1px rgba(255, 255, 255, 0.06),
        inset 0 -26px 48px rgba(0, 0, 0, 0.22);
}

/* Frost the terminal glass too */
.terminal-window {
    background-image:
        var(--grain),
        linear-gradient(135deg, rgba(40, 40, 50, 0.72), rgba(12, 12, 16, 0.86));
    background-size: 150px 150px, 100% 100%;
    background-blend-mode: overlay, normal;
    backdrop-filter: blur(30px) saturate(160%);
    -webkit-backdrop-filter: blur(30px) saturate(160%);
}

/* Glassify the smaller UI — buttons, chips, icons, badges */
.nav-cta,
.tag,
.skill,
.cert-badge,
.social-links a,
.social-icons a {
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.tag, .skill {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 60%),
        var(--surface-2);
}

/* Deeper frosted nav on scroll */
.navbar.scrolled {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 60%),
        rgba(8, 8, 10, 0.5);
    backdrop-filter: saturate(190%) blur(34px);
    -webkit-backdrop-filter: saturate(190%) blur(34px);
}

/* Light-theme grain should be far subtler over white glass */
[data-theme="light"] .stat-card,
[data-theme="light"] .highlight-item,
[data-theme="light"] .timeline-content,
[data-theme="light"] .project-card,
[data-theme="light"] .skill-category,
[data-theme="light"] .achievement-card,
[data-theme="light"] .contact-item,
[data-theme="light"] .contact-form-wrapper,
[data-theme="light"] .writeup-card {
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.4) 40%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.45) 60%);
    background-blend-mode: normal, normal;
    box-shadow: 0 12px 44px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

@media (max-width: 768px) {
    /* Keep the deeper blur affordable on phones */
    .stat-card, .highlight-item, .timeline-content, .project-card,
    .skill-category, .achievement-card, .contact-item, .contact-form-wrapper, .writeup-card {
        backdrop-filter: blur(16px) saturate(160%);
        -webkit-backdrop-filter: blur(16px) saturate(160%);
    }
}

/* ============================================================
   Glassier v2 — thick-glass depth, corner specular,
   chromatic edges, colored under-glow, drifting caustic
   ============================================================ */
.stat-card,
.highlight-item,
.timeline-content,
.project-card,
.skill-category,
.achievement-card,
.contact-item,
.contact-form-wrapper,
.writeup-card {
    background-image:
        var(--grain),
        radial-gradient(130px circle at 14% 10%, rgba(255, 255, 255, 0.12), transparent 62%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 64%);
    background-size: 150px 150px, 100% 100%, 100% 100%, 100% 100%;
    background-blend-mode: overlay, screen, normal, normal;
    background-color: transparent;
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow:
        0 22px 56px rgba(0, 0, 0, 0.5),
        0 30px 64px -32px var(--accent-soft),           /* light bleeding through */
        inset 0 1px 0 rgba(255, 255, 255, 0.26),        /* top glare */
        inset 0 -1px 0 rgba(255, 255, 255, 0.09),       /* bottom rim catch */
        inset 3px 0 8px rgba(100, 210, 255, 0.05),      /* chromatic edge — cyan */
        inset -3px 0 8px rgba(48, 209, 88, 0.05),       /* chromatic edge — green */
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 -26px 46px rgba(0, 0, 0, 0.2);          /* glass thickness */
}

/* Brighter, thicker refractive rim */
.stat-card::before,
.highlight-item::before,
.timeline-content::before,
.project-card::before,
.skill-category::before,
.achievement-card::before,
.contact-form-wrapper::before {
    padding: 2px;
    opacity: 0.55;
}

/* Slow drifting caustic shimmer on the hero terminal */
.terminal-window {
    backdrop-filter: blur(38px) saturate(180%) brightness(1.08);
    -webkit-backdrop-filter: blur(38px) saturate(180%) brightness(1.08);
    box-shadow:
        0 44px 100px rgba(0, 0, 0, 0.65),
        0 40px 80px -40px rgba(100, 210, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.terminal-window::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(200px circle at 20% 0%, rgba(255, 255, 255, 0.14), transparent 55%);
    pointer-events: none;
    z-index: 1;
    animation: caustic 12s ease-in-out infinite alternate;
}
@keyframes caustic {
    0%   { transform: translate3d(-8%, -4%, 0); opacity: 0.7; }
    100% { transform: translate3d(60%, 6%, 0); opacity: 1; }
}

/* Frostier chips, buttons and icons */
.nav-cta, .tag, .skill, .cert-badge, .social-links a, .social-icons a, .btn-ghost, .theme-toggle {
    backdrop-filter: blur(20px) saturate(170%);
    -webkit-backdrop-filter: blur(20px) saturate(170%);
}

/* Keep light theme clean — no colored under-glow, softer depth */
[data-theme="light"] .stat-card,
[data-theme="light"] .highlight-item,
[data-theme="light"] .timeline-content,
[data-theme="light"] .project-card,
[data-theme="light"] .skill-category,
[data-theme="light"] .achievement-card,
[data-theme="light"] .contact-item,
[data-theme="light"] .contact-form-wrapper,
[data-theme="light"] .writeup-card {
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

@media (prefers-reduced-motion: reduce) {
    .terminal-window::before { animation: none; }
}

@media (max-width: 768px) {
    .stat-card, .highlight-item, .timeline-content, .project-card,
    .skill-category, .achievement-card, .contact-item, .contact-form-wrapper, .writeup-card {
        backdrop-filter: blur(18px) saturate(170%);
        -webkit-backdrop-filter: blur(18px) saturate(170%);
    }
}
