
/* Nav overlay for closing on outside tap */
.nav-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 998;
    backdrop-filter: blur(2px);
}
.nav-overlay.active { display: block; }

/* CSS Variables — Dark (default) */
:root {
    --bg:            #050709;
    --bg-2:          #0a0d12;
    --bg-card:       #0d1117;
    --bg-card-2:     #111620;
    --accent:        #ff8c00;
    --accent-2:      #ffa500;
    --accent-dim:    rgba(255, 140, 0, 0.12);
    --accent-glow:   rgba(255, 140, 0, 0.35);
    --white:         #f0f4ff;
    --grey:          #8892a4;
    --grey-dim:      #3a4255;
    --border:        rgba(255, 140, 0, 0.25);
    --border-dim:    rgba(255, 255, 255, 0.06);
    --font-display:  'Orbitron', monospace;
    --font-body:     'Rajdhani', sans-serif;
    --font-mono:     'Share Tech Mono', monospace;
    --radius:        4px;
    --transition:    0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Force all headings and .hero-name to use Times New Roman */
h1, h2, h3, h4, h5, h6, .hero-name, .logo-name, .logo-accent, .name-line {
    font-family: 'Times New Roman', Times, serif !important;
    font-weight: bold !important;
}

/* Light mode variables */
[data-theme="light"] {
    --bg:            #f5f6fa;
    --bg-2:          #eceef5;
    --bg-card:       #ffffff;
    --bg-card-2:     #f0f2f8;
    --accent:        #e07000;
    --accent-2:      #ff8c00;
    --accent-dim:    rgba(224, 112, 0, 0.10);
    --accent-glow:   rgba(224, 112, 0, 0.28);
    --white:         #1a1d2e;
    --grey:          #5a6175;
    --grey-dim:      #c8cdd8;
    --border:        rgba(224, 112, 0, 0.30);
    --border-dim:    rgba(0, 0, 0, 0.09);
}

/* THEME TOGGLE — pill slider */
.theme-toggle {
    position: relative;
    display: flex;
    align-items: center;
    width: 62px; height: 30px;
    background: var(--bg-card-2);
    border: 1px solid var(--border-dim);
    border-radius: 99px;
    padding: 3px;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
    overflow: hidden;
    outline: none;
    box-shadow: none;
}
.theme-toggle:hover { border-color: var(--border); box-shadow: 0 0 10px var(--accent-glow); }
.theme-toggle:focus { outline: none; box-shadow: 0 0 0 2px var(--accent-glow); }
.theme-toggle:focus:not(:focus-visible) { box-shadow: none; }

.theme-icon {
    position: relative; z-index: 2;
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: color var(--transition), opacity var(--transition);
}
.theme-icon--dark  { color: #a0b0d0; margin-right: 7px; }
.theme-icon--light { color: #f5a623; }

/* Sliding pill indicator */
.theme-slider {
    position: absolute;
    top: 2px; left: 2px;
    width: 24px; height: 24px;
    background: var(--accent);
    border-radius: 50%;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.35s;
    z-index: 1;
    box-shadow: 0 0 8px var(--accent-glow);
}

[data-theme="light"] .theme-slider {
    transform: translateX(32px);
}

[data-theme="light"] .theme-icon--dark  { opacity: 0.35; }
:root:not([data-theme="light"]) .theme-icon--light { opacity: 0.35; }


[data-theme="light"] .navbar {
    background: rgba(245, 246, 250, 0.92);
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

[data-theme="light"] .nav-links {
    background: rgba(245, 246, 250, 0.98);
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea {
    color: var(--white);
}
[data-theme="light"] .form-group input::placeholder,
[data-theme="light"] .form-group textarea::placeholder {
    color: var(--grey);
}
[data-theme="light"] .form-submit { color: #fff; }
[data-theme="light"] .hamburger span { background: var(--white); }
[data-theme="light"] ::-webkit-scrollbar-track { background: var(--bg); }
[data-theme="light"] .loader { background: var(--bg); }
[data-theme="light"] .terminal-widget { background: #1e2330; }
[data-theme="light"] .terminal-body   { background: #1e2330; }


body, .navbar, .nav-links, .hero-grid, .loader,
.bg-card, section, footer, .project-card,
.about-card, .hobby-card, .skill-card {
    transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body, html {
    background: var(--bg);
    color: var(--white);
    font-family: 'Times New Roman', Times, serif !important;
    font-size: 16px;
    line-height: 1.7;
    cursor: none;
    overflow-x: hidden;
}
::selection { background: var(--accent); color: #000; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 99px; }

/*
   LOADER */
.loader {
    position: fixed; inset: 0;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { position: relative; width: 120px; height: 120px; }
.loader-ring {
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    animation: loaderSpin 1.5s linear infinite;
}
.loader-ring:nth-child(1) { border-top-color: var(--accent); }
.loader-ring:nth-child(2) { border-right-color: var(--accent-2); animation-duration: 2s; animation-direction: reverse; inset: 10px; }
.loader-ring:nth-child(3) { border-bottom-color: #fff; animation-duration: 2.5s; inset: 20px; }
@keyframes loaderSpin { to { transform: rotate(360deg); } }
.loader-text {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-size: 9px;
    color: var(--accent); letter-spacing: 2px;
}

/*
   CURSOR */
.cursor-dot, .cursor-ring {
    position: fixed; pointer-events: none; z-index: 9998;
    border-radius: 50%; transform: translate(-50%, -50%);
}
.cursor-dot { width: 6px; height: 6px; background: var(--accent); transition: width .2s, height .2s; }
.cursor-ring { width: 30px; height: 30px; border: 1.5px solid var(--accent); opacity: 0.5; }

/*
   SCROLL TO TOP */
.scroll-top {
    position: fixed; bottom: 28px; right: 28px;
    width: 46px; height: 46px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--accent);
    font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 500; opacity: 0; pointer-events: none;
    transform: translateY(20px);
    transition: all var(--transition);
}
.scroll-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.scroll-top:hover { background: var(--accent); color: #000; box-shadow: 0 0 20px var(--accent-glow); }

/*
   NAVIGATION */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 3%;
    height: 68px;
    background: rgba(5, 7, 9, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-dim);
    z-index: 999;
    transition: all var(--transition);
    gap: 1rem;
}
.navbar.scrolled {
    height: 58px;
    border-bottom-color: var(--border);
    box-shadow: 0 4px 30px rgba(0,0,0,0.6);
}

/* Logo */
.nav-logo {
    font-family: var(--font-display);
    font-size: 1.05rem; font-weight: 700; letter-spacing: 2px;
    white-space: nowrap; flex-shrink: 0;
}
.logo-bracket { color: var(--accent); opacity: 0.6; }
.logo-name { color: var(--white); margin: 0 2px; }
.logo-accent { color: var(--accent); }


/* Nav links */
.nav-links {
    display: flex; align-items: center; gap: 0.1rem;
    margin-left: auto; margin-right: 0;
}
.nav-link {
    font-family: var(--font-body); font-size: 0.82rem;
    font-weight: 600; letter-spacing: 1px;
    padding: 8px 11px; color: var(--grey);
    position: relative; transition: color var(--transition);
    text-transform: uppercase;
}
.nav-link::after {
    content: ''; position: absolute; bottom: 4px; left: 50%; right: 50%;
    height: 1px; background: var(--accent);
    transition: left var(--transition), right var(--transition);
}
.nav-link:hover { color: var(--white); }
.nav-link:hover::after { left: 11px; right: 11px; }
.nav-link.active { color: var(--accent); }

.nav-resume {
    font-family: var(--font-mono); font-size: 0.75rem;
    padding: 7px 14px; margin-left: 6px;
    border: 1px solid var(--accent); color: var(--accent);
    border-radius: var(--radius); letter-spacing: 1px;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
    display: flex; align-items: center; gap: 5px;
    white-space: nowrap; transform: none !important;
}
.nav-resume:hover { background: var(--accent); color: #000; box-shadow: 0 0 20px var(--accent-glow); transform: none !important; }

/* Hamburger */
.hamburger {
    display: none; flex-direction: column; gap: 5px;
    cursor: pointer; padding: 4px; z-index: 1001; flex-shrink: 0;
    background: none; border: none;
}
.hamburger span {
    display: block; width: 24px; height: 2px;
    background: var(--white); transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/*
   HERO SECTION */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    justify-items: center;
    padding: 88px 4% 60px;
    position: relative;
    overflow: hidden;
    gap: 2rem;
}
.hero-content {
    justify-self: start;
    flex: 1; max-width: 480px; position: relative; z-index: 2;
}
.hero-terminal-center {
    position: relative; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    animation: fadeDown 1s 0.7s ease both;
}
/* Hero background: smooth radial glow — no grid boxes */
.hero-grid {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 30% 55%, rgba(255,140,0,0.07) 0%, transparent 70%),
        radial-gradient(ellipse 50% 50% at 75% 40%, rgba(255,165,0,0.05) 0%, transparent 65%);
    pointer-events: none;
    transition: background 0.4s ease;
}
[data-theme="light"] .hero-grid {
    background:
        radial-gradient(ellipse 70% 60% at 30% 55%, rgba(224,112,0,0.09) 0%, transparent 70%),
        radial-gradient(ellipse 50% 50% at 75% 40%, rgba(255,140,0,0.06) 0%, transparent 65%);
}

.scanline {
    position: absolute; inset: 0;
    background: linear-gradient(transparent 50%, rgba(0,0,0,0.025) 50%);
    background-size: 100% 4px;
    pointer-events: none; animation: scanMove 10s linear infinite; opacity: 0.18;
}
@keyframes scanMove { 100% { background-position: 0 100vh; } }

/* PARTICLES */
.particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.particle {
    position: absolute;
    border-radius: 50%; opacity: 0;
    background: var(--accent);
    animation: particleFloat var(--dur, 5s) ease-in-out var(--del, 0s) infinite;
}
/* size variants */
.particle.sm  { width: 2px;  height: 2px; }
.particle.md  { width: 4px;  height: 4px; }
.particle.lg  { width: 6px;  height: 6px; }
.particle.xl  { width: 10px; height: 10px; filter: blur(2px); }
/* drift variants — gentle sideways wobble */
.particle.drift-l { animation-name: particleFloatL; }
.particle.drift-r { animation-name: particleFloatR; }
.particle.drift-w { animation-name: particleFloatW; }

@keyframes particleFloat {
    0%   { opacity: 0; transform: translateY(0)    scale(0.4); }
    15%  { opacity: 0.9; }
    70%  { opacity: 0.5; }
    100% { opacity: 0; transform: translateY(-160px) scale(1.2); }
}
@keyframes particleFloatL {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.4); }
    15%  { opacity: 0.85; }
    70%  { opacity: 0.45; }
    100% { opacity: 0; transform: translate(-40px, -180px) scale(1.3); }
}
@keyframes particleFloatR {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.3); }
    15%  { opacity: 0.9; }
    70%  { opacity: 0.4; }
    100% { opacity: 0; transform: translate(40px, -160px) scale(1.4); }
}
@keyframes particleFloatW {
    0%   { opacity: 0;   transform: translate(0, 0)      scale(0.3); }
    20%  { opacity: 0.7; transform: translate(18px, -50px) scale(0.9); }
    50%  { opacity: 0.5; transform: translate(-12px,-100px) scale(1.1); }
    80%  { opacity: 0.3; transform: translate(10px, -150px) scale(1.3); }
    100% { opacity: 0;   transform: translate(-5px,-190px)  scale(0.8); }
}

/* Hero Content (left) - keep as-is, already updated above */
.hero-name {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 900; line-height: 1.05;
    margin-bottom: 1rem; letter-spacing: -1px;
}
.name-line { display: block; opacity: 0; animation: slideUp 0.8s ease forwards; }
.name-line:nth-child(1) { animation-delay: 0.2s; }
.name-line:nth-child(2) { animation-delay: 0.4s; }
.name-line.accent { color: var(--accent); }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.hero-role {
    font-family: var(--font-mono); font-size: 1.05rem;
    color: var(--grey); margin-bottom: 1.2rem; min-height: 28px;
    animation: fadeDown 0.8s 0.6s ease both;
}
.role-prefix { color: var(--accent); }
.typing-text { color: var(--white); }
.cursor-blink { color: var(--accent); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }

.hero-bio {
    font-size: 0.98rem; color: var(--grey);
    max-width: 460px; margin-bottom: 1.4rem; line-height: 1.8;
    animation: fadeDown 0.8s 0.8s ease both;
}
.highlight { color: var(--accent); font-weight: 600; }

/* Philosophy quote in hero */
.philosophy-quote {
    display: flex; align-items: flex-start; gap: 10px;
    background: var(--accent-dim); border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius); padding: 12px 16px;
    margin-bottom: 1.8rem; font-size: 0.88rem;
    color: var(--grey); font-style: italic; line-height: 1.6;
    animation: fadeDown 0.8s 1s ease both;
}
.q-icon { color: var(--accent); font-size: 1rem; flex-shrink: 0; margin-top: 2px; }
.q-heart { margin-left: 4px; font-style: normal; }

.hero-actions {
    display: flex; gap: 1rem; flex-wrap: wrap;
    margin-bottom: 1.8rem;
    animation: fadeDown 0.8s 1.1s ease both;
}
.btn-primary, .btn-secondary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 26px; font-family: var(--font-body);
    font-size: 0.88rem; font-weight: 700; letter-spacing: 1px;
    border-radius: var(--radius); transition: all var(--transition);
    position: relative; overflow: hidden; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #000; border: none; }
.btn-primary:hover { background: var(--accent-2); box-shadow: 0 0 30px var(--accent-glow); transform: translateY(-2px); }
.btn-glow {
    position: absolute; inset: -2px; background: var(--accent);
    opacity: 0; filter: blur(12px); transition: opacity var(--transition); border-radius: inherit;
}
.btn-primary:hover .btn-glow { opacity: 0.4; }
.btn-secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-secondary:hover { background: var(--accent-dim); box-shadow: 0 0 20px var(--accent-glow); transform: translateY(-2px); }

.hero-socials { display: flex; gap: 0.6rem; flex-wrap: wrap; animation: fadeDown 0.8s 1.3s ease both; }
.social-link {
    width: 38px; height: 38px;
    border: 1px solid var(--border-dim); border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: var(--grey); font-size: 0.85rem;
    transition: all var(--transition);
}
.social-link:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 14px var(--accent-glow); transform: translateY(-3px); }

/* Hero Visual (right) */
.hero-visual {
    justify-self: end;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    animation: fadeRight 1s 0.5s ease both;
}
@keyframes fadeRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/*
   PROFILE CARD (new design) */
.profile-card {
    position: relative;
    width: 260px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(255,140,0,0.08), 0 20px 60px rgba(0,0,0,0.6);
}
.profile-card-scanline {
    position: absolute; inset: 0;
    background: linear-gradient(transparent 50%, rgba(255,140,0,0.015) 50%);
    background-size: 100% 4px; pointer-events: none; z-index: 1;
}
.profile-card-corner {
    position: absolute; width: 14px; height: 14px;
    border-color: var(--accent); border-style: solid; z-index: 3;
    animation: cornerGlow 2s ease-in-out infinite;
}
.profile-card-corner.tl { top: 6px; left: 6px; border-width: 2px 0 0 2px; }
.profile-card-corner.tr { top: 6px; right: 6px; border-width: 2px 2px 0 0; }
.profile-card-corner.bl { bottom: 6px; left: 6px; border-width: 0 0 2px 2px; }
.profile-card-corner.br { bottom: 6px; right: 6px; border-width: 0 2px 2px 0; }
@keyframes cornerGlow { 0%,100% { opacity: 0.5; } 50% { opacity: 1; box-shadow: 0 0 8px var(--accent-glow); } }

.profile-card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px 8px;
    border-bottom: 1px solid var(--border-dim);
    background: var(--bg-card-2);
}
.profile-id-label {
    font-family: var(--font-mono); font-size: 0.6rem;
    color: var(--accent); letter-spacing: 2px; opacity: 0.7;
}
.profile-status {
    display: flex; align-items: center; gap: 5px;
    font-family: var(--font-mono); font-size: 0.6rem; color: #28c840; letter-spacing: 1px;
}
.status-dot {
    width: 6px; height: 6px; border-radius: 50%; background: #28c840;
    animation: statusPulse 1.5s ease-in-out infinite;
}
@keyframes statusPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(40,200,64,0.4); } 50% { box-shadow: 0 0 0 4px rgba(40,200,64,0); } }

.profile-img-frame {
    position: relative;
    width: 400px;
    height: 400px;
    margin-left: -40px;
    margin-right: auto;
    border-radius: 50%;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    animation: profile-updown 2.5s ease-in-out infinite;
}
/* Outer slow-spin dashed accent ring */
.profile-img-frame::after {
    content: '';
    position: absolute;
    top: -14px; left: -14px; right: -14px; bottom: -14px;
    border-radius: 50%;
    border: 1.5px dashed rgba(255,140,0,0.30);
    animation: border-spin-slow 12s linear infinite reverse;
    pointer-events: none;
    z-index: 0;
}
@keyframes border-spin-slow {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes profile-updown {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}
.profile-img-inner {
    width: 320px;
    height: 320px;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    z-index: 2;
    border: 3px solid var(--accent);
    background: #111;
    box-shadow:
        0 0 0 6px rgba(255,140,0,0.08),
        0 0 30px rgba(255,140,0,0.20),
        0 0 60px rgba(255,140,0,0.10);
    animation: photo-pulse 3s ease-in-out infinite;
}
@keyframes photo-pulse {
    0%,100% { box-shadow: 0 0 0 6px rgba(255,140,0,0.08), 0 0 30px rgba(255,140,0,0.20), 0 0 60px rgba(255,140,0,0.10); }
    50%      { box-shadow: 0 0 0 10px rgba(255,140,0,0.12), 0 0 50px rgba(255,140,0,0.30), 0 0 90px rgba(255,140,0,0.15); }
}
.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    border: none;
    box-shadow: none;
    z-index: 2;
    position: relative;
}

.profile-img-frame::before {
    content: '';
    position: absolute;
    top: -6px; left: -6px; right: -6px; bottom: -6px;
    z-index: 1;
    border-radius: 50%;
    pointer-events: none;
    background: conic-gradient(
        from 0deg,
        var(--accent) 0deg,
        transparent 60deg,
        var(--accent-2) 120deg,
        transparent 180deg,
        var(--accent) 240deg,
        transparent 300deg,
        var(--accent) 360deg
    );
    animation: border-spin 4s linear infinite;
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 3px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 3px));
    filter: drop-shadow(0 0 6px var(--accent-glow));
}
@keyframes border-spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.profile-img-border-anim {
    display: none;
}

@keyframes profile-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
.profile-placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 5rem; font-weight: 900;
    color: var(--accent); background: var(--bg-card-2);
    border-radius: 50%;
}
.profile-img-inner:not(.no-img) .profile-placeholder { display: none; }

.profile-card-body { padding: 14px 16px 10px; }
.profile-card-name {
    font-family: var(--font-display); font-size: 1rem; font-weight: 700;
    color: var(--white); letter-spacing: 1px; margin-bottom: 4px;
}
.profile-card-role {
    font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent);
    letter-spacing: 1px; margin-bottom: 12px;
    display: flex; align-items: center; gap: 5px;
}
.profile-card-divider {
    height: 1px; background: linear-gradient(90deg, var(--accent), transparent);
    margin-bottom: 12px; opacity: 0.4;
}
.profile-card-stats {
    display: flex; align-items: center; justify-content: space-around;
    margin-bottom: 12px;
}
.pc-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pc-stat-val {
    font-family: var(--font-display); font-size: 1rem; font-weight: 700;
    color: var(--white); line-height: 1;
}
.pc-stat-label {
    font-family: var(--font-mono); font-size: 0.55rem; color: var(--grey);
    letter-spacing: 1px; text-transform: uppercase;
}
.pc-stat-sep { width: 1px; height: 28px; background: var(--border-dim); }

.profile-card-socials {
    display: flex; gap: 7px; justify-content: center; margin-bottom: 4px;
}
.pcs-link {
    width: 30px; height: 30px; border: 1px solid var(--border-dim); border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    color: var(--grey); font-size: 0.7rem; transition: all var(--transition);
}
.pcs-link:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); box-shadow: 0 0 10px var(--accent-glow); }

.profile-card-barcode {
    border-top: 1px solid var(--border-dim);
    padding: 8px 16px;
    background: var(--bg-card-2);
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.barcode-lines {
    width: 100%; height: 20px;
    background: repeating-linear-gradient(
        90deg,
        var(--accent) 0px, var(--accent) 2px,
        transparent 2px, transparent 4px,
        var(--accent) 4px, var(--accent) 5px,
        transparent 5px, transparent 8px,
        var(--accent) 8px, var(--accent) 11px,
        transparent 11px, transparent 13px,
        var(--accent) 13px, var(--accent) 14px,
        transparent 14px, transparent 17px,
        var(--accent) 17px, var(--accent) 20px,
        transparent 20px, transparent 22px
    );
    opacity: 0.3;
}
.barcode-text {
    font-family: var(--font-mono); font-size: 0.5rem; color: var(--grey);
    letter-spacing: 2px; opacity: 0.5;
}

/* Terminal widget */
.terminal-widget {
    width: 290px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 20px rgba(255,140,0,0.08);
}
.terminal-bar {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 12px; background: var(--bg-card-2);
    border-bottom: 1px solid var(--border-dim);
}
.t-dot { width: 10px; height: 10px; border-radius: 50%; }
.t-dot.red { background: #ff5f57; } .t-dot.yellow { background: #febc2e; } .t-dot.green { background: #28c840; }
.t-title { font-family: var(--font-mono); font-size: 0.68rem; color: var(--grey); margin-left: 6px; }
.terminal-body { padding: 12px 14px; font-family: var(--font-mono); font-size: 0.72rem; line-height: 1.9; }
.t-line { display: flex; gap: 6px; }
.t-cmd { color: var(--accent); }
.t-cmd::before { content: '$ '; color: var(--grey-dim); }
.t-out { color: var(--grey); padding-left: 14px; }
.t-green { color: #28c840 !important; }
.t-blink { animation: blink 1s step-end infinite; color: var(--accent); }

/* Scroll hint */
.scroll-hint {
    position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    font-family: var(--font-mono); font-size: 0.68rem; color: var(--grey); letter-spacing: 2px;
    animation: fadeDown 1s 2s ease both;
}
.scroll-line {
    width: 1px; height: 50px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollDrop 1.5s ease-in-out infinite;
}
@keyframes scrollDrop {
    0%  { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform: scaleY(1); transform-origin: bottom; }
    100%{ transform: scaleY(0); transform-origin: bottom; }
}

/*
   SHARED SECTION STYLES */
.section { padding: 100px 5%; position: relative; overflow: hidden; }
.container { max-width: 1100px; margin: 0 auto; position: relative; }

.section-bg-text {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: clamp(5rem, 15vw, 12rem); font-weight: 900;
    color: rgba(255,140,0,0.022);
    white-space: nowrap; pointer-events: none; user-select: none; letter-spacing: 10px;
}

.section-header { text-align: center; margin-bottom: 4rem; }
.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: 2px;
}
.section-title .accent { color: var(--accent); }
.title-line {
    width: 60px; height: 2px; background: var(--accent);
    margin: 1rem auto 0;
    box-shadow: 0 0 10px var(--accent-glow);
    position: relative;
}
.title-line::before {
    content: ''; position: absolute; top: 0; left: -20px;
    width: 12px; height: 100%; background: var(--accent); opacity: 0.4;
}
.title-line::after {
    content: ''; position: absolute; top: 0; right: -20px;
    width: 12px; height: 100%; background: var(--accent); opacity: 0.4;
}

/* Reveal on scroll */
.reveal {
    opacity: 0; transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="100"] { transition-delay: 0.1s; }
.reveal[data-delay="200"] { transition-delay: 0.2s; }
.reveal[data-delay="300"] { transition-delay: 0.3s; }
.reveal[data-delay="400"] { transition-delay: 0.4s; }
.reveal[data-delay="500"] { transition-delay: 0.5s; }
.reveal[data-delay="600"] { transition-delay: 0.6s; }

/* Card shared */
.card-glow {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at top, rgba(255,140,0,0.05) 0%, transparent 70%);
    opacity: 0; transition: opacity var(--transition); pointer-events: none;
}
.card-corner {
    position: absolute; width: 10px; height: 10px;
    border-color: var(--accent); border-style: solid; opacity: 0.4;
    transition: opacity var(--transition);
}
.card-corner.tl { top: 8px; left: 8px; border-width: 1px 0 0 1px; }
.card-corner.tr { top: 8px; right: 8px; border-width: 1px 1px 0 0; }
.card-corner.bl { bottom: 8px; left: 8px; border-width: 0 0 1px 1px; }
.card-corner.br { bottom: 8px; right: 8px; border-width: 0 1px 1px 0; }

/*
   ABOUT SECTION */
.about-section { background: var(--bg-2); }
.about-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.4rem; margin-bottom: 2.5rem;
}
.about-card {
    background: var(--bg-card); border: 1px solid var(--border-dim);
    border-radius: var(--radius); padding: 2rem 1.5rem;
    position: relative; overflow: hidden;
    transition: border-color var(--transition), transform var(--transition);
}
.about-card:hover { border-color: var(--border); transform: translateY(-6px); }
.about-card:hover .card-glow { opacity: 1; }
.about-card:hover .card-corner { opacity: 1; }
.about-icon-wrap {
    width: 48px; height: 48px; background: var(--accent-dim);
    border: 1px solid var(--border); border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center; margin-bottom: 1rem;
}
.about-icon { font-size: 1.2rem; color: var(--accent); }
.about-card h3 {
    font-family: var(--font-display); font-size: 0.82rem; font-weight: 700;
    letter-spacing: 2px; margin-bottom: 0.8rem; color: var(--accent);
}
.about-card p { color: var(--grey); font-size: 0.88rem; }
.about-info-list { display: flex; flex-direction: column; gap: 0.5rem; }
.about-info-list li { display: flex; align-items: center; gap: 10px; color: var(--grey); font-size: 0.86rem; }
.about-info-list li i { color: var(--accent); width: 16px; font-size: 0.8rem; }

/* Philosophy banner */
.philosophy-banner {
    background: var(--bg-card); border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius); padding: 2rem 2.5rem;
    text-align: center; margin-top: 1rem;
    position: relative; overflow: hidden;
}
.philosophy-banner::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, rgba(255,140,0,0.04) 0%, transparent 70%);
}
.pb-icon {
    font-size: 2rem; color: var(--accent); margin-bottom: 1rem;
    animation: pulse 2s ease infinite;
}
@keyframes pulse { 0%,100% { text-shadow: 0 0 10px var(--accent-glow); } 50% { text-shadow: 0 0 30px rgba(255,140,0,0.8); } }
.philosophy-banner blockquote {
    font-family: var(--font-body); font-size: 1.15rem;
    font-style: italic; color: var(--white); line-height: 1.8;
    max-width: 700px; margin: 0 auto;
}
.pb-label { margin-top: 1rem; font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); letter-spacing: 2px; }

/*
   EDUCATION SECTION */
.education-section { background: var(--bg); }
.timeline { position: relative; display: flex; flex-direction: column; }
.timeline::before {
    content: ''; position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--accent), var(--accent), transparent);
    box-shadow: 0 0 12px var(--accent-glow);
}
.timeline-item {
    display: flex; justify-content: flex-end;
    padding: 0 calc(50% + 44px) 3rem 0;
    position: relative; opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.timeline-item[data-side="right"] {
    justify-content: flex-start;
    padding: 0 0 3rem calc(50% + 44px);
    transform: translateX(40px);
}
.timeline-item.visible { opacity: 1; transform: translateX(0); }

.timeline-dot {
    position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
    width: 44px; height: 44px;
    background: var(--bg-card); border: 2px solid var(--accent); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); font-size: 0.9rem; z-index: 2;
    box-shadow: 0 0 20px var(--accent-glow);
}
.timeline-dot.current { background: var(--accent); color: #000; }

.timeline-card {
    background: var(--bg-card); border: 1px solid var(--border-dim);
    border-radius: var(--radius); padding: 1.5rem; max-width: 420px;
    position: relative; transition: all var(--transition);
}
.timeline-card:hover { border-color: var(--border); transform: translateY(-4px); }
.timeline-card:hover .card-glow { opacity: 1; }
.timeline-card:hover .card-corner { opacity: 1; }
.timeline-card.featured { border-color: rgba(255,140,0,0.25); }

.timeline-badge {
    display: inline-flex; background: var(--accent); color: #000;
    font-size: 0.68rem; font-weight: 700; font-family: var(--font-mono);
    letter-spacing: 1px; padding: 3px 10px; border-radius: 99px; margin-bottom: 0.8rem;
}
.timeline-year { font-family: var(--font-mono); font-size: 0.76rem; color: var(--accent); letter-spacing: 2px; margin-bottom: 0.4rem; }
.timeline-card h3 { font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; letter-spacing: 1px; margin-bottom: 0.4rem; }
.timeline-grade { font-size: 0.78rem; color: var(--accent); opacity: 0.85; margin-bottom: 0.8rem; }
.timeline-card p { color: var(--grey); font-size: 0.86rem; }

.modules-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.module-tag {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--accent-dim); border: 1px solid var(--border);
    border-radius: 99px; padding: 4px 10px;
    font-size: 0.7rem; color: var(--accent); font-family: var(--font-mono);
}

/*
   PROJECTS SECTION */
.projects-section { background: var(--bg-2); }
.projects-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
}
.project-card {
    background: var(--bg-card); border: 1px solid var(--border-dim);
    border-radius: var(--radius); padding: 1.8rem;
    position: relative; overflow: hidden;
    transition: all var(--transition);
}
.project-card:hover { border-color: var(--border); transform: translateY(-8px); }
.project-card:hover .project-glow { opacity: 1; }
.project-card.full-width { grid-column: 1 / -1; }

.project-glow {
    position: absolute; inset: 0;
    background: radial-gradient(circle at top left, rgba(255,140,0,0.07) 0%, transparent 60%);
    opacity: 0; transition: opacity var(--transition); pointer-events: none;
}
.project-num {
    position: absolute; top: 10px; right: 16px;
    font-family: var(--font-display); font-size: 2.5rem; font-weight: 900;
    color: rgba(255,140,0,0.07); line-height: 1; transition: color var(--transition);
}
.project-card:hover .project-num { color: rgba(255,140,0,0.14); }
.project-icon-wrap {
    width: 46px; height: 46px; background: var(--accent-dim);
    border: 1px solid var(--border); border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center; margin-bottom: 1rem;
}
.project-icon { font-size: 1.2rem; color: var(--accent); }
.project-card h3 {
    font-family: var(--font-display); font-size: 0.85rem; font-weight: 700;
    letter-spacing: 1.5px; margin-bottom: 0.3rem; color: var(--white);
}
.proj-year { font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent); opacity: 0.7; margin-bottom: 0.7rem; letter-spacing: 1px; }
.project-card p { color: var(--grey); font-size: 0.86rem; margin-bottom: 1rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.project-tags span {
    font-family: var(--font-mono); font-size: 0.68rem; color: var(--accent);
    background: var(--accent-dim); border: 1px solid var(--border);
    padding: 2px 8px; border-radius: 2px;
}
.project-links { display: flex; gap: 0.7rem; }
.proj-link {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.76rem; font-family: var(--font-mono); color: var(--grey);
    border: 1px solid var(--border-dim); padding: 5px 12px; border-radius: var(--radius);
    transition: all var(--transition);
}
.proj-link:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

/* Tool showcase grid */
.tool-showcase {
    display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1rem;
}
.tool-item {
    display: flex; align-items: center; gap: 7px;
    background: var(--bg-card-2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 8px 14px;
    font-family: var(--font-mono); font-size: 0.75rem; color: var(--white);
    transition: all var(--transition);
}
.tool-item i { color: var(--accent); font-size: 0.9rem; }
.tool-item:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); transform: translateY(-2px); }

/*
   SKILLS SECTION */
.skills-section { background: var(--bg); }
.skills-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.skills-sub {
    font-family: var(--font-display); font-size: 0.75rem; font-weight: 700;
    letter-spacing: 3px; color: var(--accent); text-transform: uppercase; margin-bottom: 1.4rem;
}
.skill-item { margin-bottom: 1.3rem; }
.skill-info { display: flex; justify-content: space-between; margin-bottom: 7px; font-family: var(--font-mono); font-size: 0.78rem; }
.skill-name { color: var(--white); display: flex; align-items: center; gap: 7px; }
.skill-name i { color: var(--accent); }
.skill-pct { color: var(--accent); }
.skill-bar { height: 6px; background: var(--bg-card); border-radius: 99px; overflow: hidden; border: 1px solid var(--border-dim); }
.skill-fill {
    height: 100%; width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 99px; box-shadow: 0 0 8px var(--accent-glow);
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.skill-fill::after {
    content: ''; position: absolute; top: 0; right: 0;
    width: 4px; height: 100%; background: #fff; border-radius: 99px; opacity: 0.7;
}
.pills-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.pill {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--bg-card); border: 1px solid var(--border-dim);
    border-radius: 99px; padding: 7px 13px;
    font-size: 0.76rem; color: var(--grey); font-family: var(--font-mono);
    transition: all var(--transition);
}
.pill i { color: var(--accent); }
.pill:hover { border-color: var(--accent); color: var(--white); background: var(--accent-dim); transform: translateY(-2px); }
.soft-skills { display: flex; gap: 1rem; flex-wrap: wrap; }
.soft-item { text-align: center; }
.soft-ring { position: relative; width: 70px; height: 70px; margin: 0 auto 0.4rem; }
.soft-ring svg { transform: rotate(-90deg); }
.soft-ring circle { fill: none; stroke-width: 5; stroke-linecap: round; }
.soft-ring .bg { stroke: var(--bg-card); }
.soft-ring .fg { stroke: var(--accent); stroke-dasharray: 213.6; stroke-dashoffset: 213.6; transition: stroke-dashoffset 1.5s cubic-bezier(0.4,0,0.2,1); filter: drop-shadow(0 0 4px var(--accent)); }
.soft-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 0.68rem; color: var(--accent); }
.soft-item p { font-size: 0.7rem; color: var(--grey); font-family: var(--font-mono); }

/*
   HOBBIES SECTION */
.hobbies-section { background: var(--bg-2); }
.hobbies-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
}
.hobby-card {
    background: var(--bg-card); border: 1px solid var(--border-dim);
    border-radius: var(--radius); padding: 1.8rem 1.5rem;
    position: relative; overflow: hidden;
    transition: all var(--transition); text-align: center;
}
.hobby-card:hover { border-color: var(--border); transform: translateY(-8px); }
.hobby-card:hover .hobby-glow { opacity: 1; }
.hobby-glow {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at top, rgba(255,140,0,0.07) 0%, transparent 70%);
    opacity: 0; transition: opacity var(--transition); pointer-events: none;
}
.hobby-icon-wrap {
    width: 56px; height: 56px; background: var(--accent-dim);
    border: 1px solid var(--border); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem; position: relative;
    transition: all var(--transition);
}
.hobby-card:hover .hobby-icon-wrap { background: var(--accent); box-shadow: 0 0 20px var(--accent-glow); }
.hobby-icon { font-size: 1.4rem; color: var(--accent); transition: color var(--transition); }
.hobby-card:hover .hobby-icon { color: #000; }
.hobby-card h3 {
    font-family: var(--font-display); font-size: 0.82rem; font-weight: 700;
    letter-spacing: 1.5px; margin-bottom: 0.8rem; color: var(--white);
}
.hobby-card p { color: var(--grey); font-size: 0.86rem; margin-bottom: 1rem; line-height: 1.7; }
.hobby-tag {
    display: inline-block; background: var(--accent-dim);
    border: 1px solid var(--border); border-radius: 99px;
    padding: 4px 14px; font-family: var(--font-mono);
    font-size: 0.72rem; color: var(--accent);
}
.hobby-quote {
    font-style: italic; color: var(--grey); font-size: 0.88rem;
    line-height: 1.7; margin-bottom: 1rem;
    border-left: 2px solid var(--accent); padding-left: 12px; text-align: left;
}
.philosophy-card { border-color: rgba(255,140,0,0.2); }
.philosophy-card .hobby-icon { color: #ff4466; }
.philosophy-card:hover .hobby-icon { color: #000; }

/*
   CONTACT SECTION */
.contact-section { background: var(--bg); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 3rem; align-items: start; }
.contact-tagline { margin-bottom: 2rem; color: var(--grey); font-size: 0.95rem; line-height: 1.8; }
.contact-items { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 2rem; }
.contact-item {
    display: flex; align-items: center; gap: 1rem;
    background: var(--bg-card); border: 1px solid var(--border-dim);
    border-radius: var(--radius); padding: 12px 15px;
    transition: all var(--transition);
}
.contact-item:not(.no-link):hover { border-color: var(--border); transform: translateX(4px); }
.ci-icon {
    width: 38px; height: 38px; background: var(--accent-dim);
    border: 1px solid var(--border); border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); font-size: 0.9rem; flex-shrink: 0;
}
.ci-text { display: flex; flex-direction: column; }
.ci-label { font-size: 0.66rem; color: var(--grey); font-family: var(--font-mono); letter-spacing: 1px; text-transform: uppercase; }
.ci-value { font-size: 0.84rem; color: var(--white); }
.contact-socials { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.cs-link {
    width: 42px; height: 42px; background: var(--bg-card);
    border: 1px solid var(--border-dim); border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: var(--grey); font-size: 0.95rem; transition: all var(--transition);
    position: relative;
}
.cs-link::before {
    content: attr(data-tooltip);
    position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--accent); font-family: var(--font-mono); font-size: 0.62rem;
    padding: 3px 7px; border-radius: 3px; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.cs-link:hover::before { opacity: 1; }
.cs-link:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 14px var(--accent-glow); }

/* Form */
.contact-form-wrap {
    background: var(--bg-card); border: 1px solid var(--border-dim);
    border-radius: var(--radius); padding: 2rem; position: relative; overflow: hidden;
    transition: border-color var(--transition);
}
.contact-form-wrap:hover { border-color: var(--border); }
.form-glow {
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0.6;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { position: relative; margin-bottom: 1.2rem; }
.form-group label {
    position: absolute; top: 12px; left: 0;
    font-size: 0.84rem; color: var(--grey); font-family: var(--font-mono);
    transition: all var(--transition); pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.form-group input, .form-group textarea {
    width: 100%; background: transparent; border: none;
    border-bottom: 1px solid var(--border-dim); padding: 12px 0 8px;
    color: var(--white); font-family: var(--font-body); font-size: 0.9rem; outline: none;
    transition: border-color var(--transition);
}
.form-group input:not(:placeholder-shown) ~ label,
.form-group input:focus ~ label,
.form-group textarea:focus ~ label { top: -8px; font-size: 0.68rem; color: var(--accent); }
.form-group textarea:not(:placeholder-shown) ~ label { top: -8px; font-size: 0.68rem; color: var(--accent); }
.form-group input:focus, .form-group textarea:focus { border-bottom-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-line {
    position: absolute; bottom: 0; left: 0; width: 0; height: 1px;
    background: var(--accent); transition: width 0.4s ease;
}
.form-group input:focus ~ .form-line,
.form-group textarea:focus ~ .form-line { width: 100%; }
.form-submit {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px;
    background: var(--accent); color: #000; border: none;
    border-radius: var(--radius); font-family: var(--font-body);
    font-size: 0.92rem; font-weight: 700; letter-spacing: 1px;
    cursor: pointer; position: relative; overflow: hidden;
    transition: all var(--transition); margin-top: 0.4rem;
}
.form-submit:hover { background: var(--accent-2); box-shadow: 0 0 30px var(--accent-glow); transform: translateY(-2px); }
.form-submit .btn-glow { position: absolute; inset: -4px; background: var(--accent); filter: blur(12px); opacity: 0; border-radius: inherit; transition: opacity var(--transition); }
.form-submit:hover .btn-glow { opacity: 0.3; }

/*
   FOOTER */
.footer { background: var(--bg-card); border-top: 1px solid var(--border-dim); }
.footer-line { height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0.5; }
.footer-inner {
    max-width: 1100px; margin: 0 auto; padding: 1.8rem 5%;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 1rem;
}
.footer-quote { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent); font-style: italic; opacity: 0.8; }
.footer-copy { font-size: 0.75rem; color: var(--grey); font-family: var(--font-mono); }
.footer-socials { display: flex; gap: 0.6rem; }
.footer-socials a {
    width: 32px; height: 32px; border: 1px solid var(--border-dim);
    border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
    color: var(--grey); font-size: 0.78rem; transition: all var(--transition);
}
.footer-socials a:hover { border-color: var(--accent); color: var(--accent); }

/*
   RESPONSIVE — Tablet (max 1024px) */
@media (max-width: 1024px) {
    .hero { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 1.5rem; }
    .hero-content { grid-column: 1; grid-row: 1; justify-self: start; }
    .hero-terminal-center { grid-column: 2; grid-row: 1; justify-self: center; }
    .hero-visual { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
    .projects-grid { grid-template-columns: 1fr 1fr; }
    .hobbies-grid  { grid-template-columns: 1fr 1fr; }
}

/*
   RESPONSIVE — Mobile (max 768px) */
@media (max-width: 768px) {
    .navbar { padding: 0 4%; gap: 0.6rem; }

        .profile-img-frame {
            width: 250px;
            height: 250px;
            margin-left: 0;
        }
        .profile-img-inner {
            width: 200px;
            height: 200px;
        }
        
        .hero-visual {
            margin-bottom: 0;
            padding-bottom: 0;
        }


    /* Full-width slide-down mobile menu */
    .scroll-hint {
        position: static;
        margin: 0.5rem auto 0 auto;
        left: unset;
        transform: none;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        z-index: 1;
        padding-bottom: 1.5rem;
    }

    .nav-links {
        position: fixed;
        top: 68px; left: 0; right: 0;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        background: rgba(10, 13, 18, 0.99);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 997;
        padding: 0;
        /* hide the double-border line */
        border-top: none;
        box-shadow: 0 8px 32px rgba(0,0,0,0.7);
    }
    .navbar.scrolled ~ * .nav-links,
    .navbar.scrolled .nav-links {
        top: 58px;
    }
    
    .nav-links.open {
        max-height: 520px;
    }

    .nav-links li {
        border-bottom: 1px solid var(--border-dim);
    }

    .nav-links li:last-child { border-bottom: none; }
    
    .nav-link {
        display: block;
        width: 100%;
        padding: 16px 24px;
        font-size: 0.9rem;
        letter-spacing: 2px;
    }
    .nav-link::after { bottom: 8px; left: 24px; right: auto; }
    .nav-link:hover::after { left: 24px; right: 24px; }
    .nav-resume {
        margin: 12px 20px 16px;
        justify-content: center;
        padding: 12px;
        font-size: 0.8rem;
    }
    .hamburger { display: flex; }

    /* Theme toggle — no outer border overflow on mobile */
    .theme-toggle {
        width: 54px; height: 26px;
    }
    .theme-slider {
        width: 20px; height: 20px;
    }
    [data-theme="light"] .theme-slider {
        transform: translateX(28px);
    }
    .theme-icon {
        width: 20px; height: 20px; font-size: 10px;
    }

    /* Hero: single column stack */
    .hero {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        padding-top: 88px;
        text-align: center;
        gap: 1.5rem;
    }
    .hero-content { grid-column: 1; grid-row: 1; max-width: 100%; justify-self: center; }
    .hero-terminal-center { grid-column: 1; grid-row: 2; margin-bottom: 0; }
    .hero-visual { grid-column: 1; grid-row: 3; justify-self: center; margin-bottom: 0; }
    .scroll-hint { grid-column: 1; grid-row: 4; }
    .hero-bio { margin: 0 auto 1.4rem; }
    .hero-actions, .hero-socials { justify-content: center; }
    .terminal-widget { width: 100%; max-width: 320px; }
    .profile-card { width: 240px; }

    .timeline::before { left: 20px; }
    .timeline-item,
    .timeline-item[data-side="right"] {
        justify-content: flex-start;
        padding: 0 0 2.5rem 60px;
    }
    .timeline-dot { left: 20px; }

    .projects-grid { grid-template-columns: 1fr; }
    .skills-layout { grid-template-columns: 1fr; }
    .hobbies-grid  { grid-template-columns: 1fr; }
    .contact-grid  { grid-template-columns: 1fr; }
    .form-row      { grid-template-columns: 1fr; }

    .footer-inner { flex-direction: column; text-align: center; }
}

/*
   RESPONSIVE — Small Mobile (max 480px) */
@media (max-width: 480px) {
    .section { padding: 70px 4%; }

    .profile-img-frame {
        width: 160px;
        height: 160px;
        margin-left: 0;
        margin-top: 40px;
        margin-bottom: 35px;
    }
    .profile-img-inner {
        width: 120px;
        height: 120px;
    }
    .hero-visual {
        margin-bottom: 0;
        padding-bottom: 0;
        z-index: 2;
    }
    .hero-terminal-center {
        z-index: 1;
        margin-bottom: 18px;
    }
    .scroll-hint {
        position: static;
        margin: 0.4rem auto 0 auto;
        left: unset;
        transform: none;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        z-index: 1;
        padding-bottom: 1.2rem;
    }
    .scroll-line { height: 35px; }
    .hero { gap: 1rem; }
    .hero-terminal-center { margin-bottom: 0; }
    .about-grid { grid-template-columns: 1fr; }
    .soft-skills { justify-content: center; }
    .hero-name { font-size: 2.4rem; }
    .philosophy-quote { font-size: 0.82rem; }

    /* Nav scrolled top */
    .navbar.scrolled .nav-links,
    .nav-links { top: 58px; }
}
