/* ==========================================================================
   KESHAV AGRAWAL — PORTFOLIO STYLESHEET
   Look: hand-built neo-brutalism. Hard borders, offset shadows, big type.
   ========================================================================== */

/* --- Theme Variables --- */
:root[data-theme="light"] {
    --paper: #f6f1e7;
    --paper-2: #ece4d4;
    --card: #fffdf6;
    --ink: #161513;
    --ink-soft: #4c4a43;
    --muted: #8b8678;

    --line: #161513;
    --shadow: #161513;
    --grid: rgba(22, 21, 19, 0.06);

    --acc-yellow: #ffd23f;
    --acc-blue: #7aa2ff;
    --acc-green: #5ee0a0;
    --acc-pink: #ff90b3;
    --acc-purple: #c0a8ff;
    --acc-red: #ff6b6b;
}

:root[data-theme="dark"] {
    --paper: #17151c;
    --paper-2: #1f1c26;
    --card: #232029;
    --ink: #f3eee0;
    --ink-soft: #c9c3b2;
    --muted: #8e8a9b;

    --line: #f3eee0;
    --shadow: #07060a;
    --grid: rgba(243, 238, 224, 0.05);

    --acc-yellow: #ffd23f;
    --acc-blue: #7aa2ff;
    --acc-green: #5ee0a0;
    --acc-pink: #ff90b3;
    --acc-purple: #c0a8ff;
    --acc-red: #ff6b6b;
}

/* --- Base & Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    font-size: 16px;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--paper);
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 34px 34px;
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Archivo Black', sans-serif;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, textarea {
    font-family: inherit;
    outline: none;
    border: none;
}

:focus-visible {
    outline: 3px solid var(--acc-blue);
    outline-offset: 2px;
}

::selection {
    background: var(--acc-yellow);
    color: #161513;
}

::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--paper);
}
::-webkit-scrollbar-thumb {
    background: var(--ink);
    border: 2px solid var(--paper);
    border-radius: 6px;
}

/* --- Shared Utilities --- */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 96px 24px;
}

.section-header {
    max-width: 760px;
    margin: 0 auto 56px auto;
    text-align: center;
}

.section-kicker {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
    border: 2px solid var(--line);
    background: var(--card);
    box-shadow: 3px 3px 0 var(--shadow);
    padding: 4px 14px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 2.9rem;
    margin-bottom: 18px;
}

.section-subtitle {
    font-size: 1.08rem;
    color: var(--ink-soft);
}

/* Marker-highlight word */
.mark {
    display: inline-block;
    padding: 0 0.18em;
    border: 2px solid #161513;
    box-shadow: 4px 4px 0 var(--shadow);
    transform: rotate(-1.2deg);
    color: #161513;
}

.mark-yellow { background: var(--acc-yellow); }
.mark-blue   { background: var(--acc-blue); }
.mark-green  { background: var(--acc-green); }
.mark-pink   { background: var(--acc-pink); }
.mark-purple { background: var(--acc-purple); }

/* --- Buttons --- */
.btn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 26px;
    border: 2px solid var(--line);
    border-radius: 10px;
    background: var(--card);
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    box-shadow: 4px 4px 0 var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--shadow);
}

.btn-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--shadow);
}

.btn-primary {
    background: var(--acc-yellow);
    color: #161513 !important;
    border-color: #161513;
}

.btn-secondary {
    background: var(--card);
}

.btn-full {
    width: 100%;
}

.btn-btn svg {
    width: 18px;
    height: 18px;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 76px;
    background: var(--paper);
    border-bottom: 2px solid var(--line);
    z-index: 100;
    transition: box-shadow 0.25s ease, background-color 0.3s ease;
}

.navbar.sticky {
    box-shadow: 0 5px 0 var(--shadow);
}

.nav-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.1rem;
    background: var(--acc-yellow);
    color: #161513;
    border: 2px solid #161513;
    box-shadow: 3px 3px 0 var(--shadow);
    padding: 4px 12px;
    transform: rotate(-1.5deg);
    transition: transform 0.2s ease;
}

.nav-logo:hover {
    transform: rotate(1.5deg);
}

.logo-code {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
}

.logo-text {
    margin: 0 3px;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-link {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
    padding: 6px 10px;
    border: 2px solid transparent;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover {
    color: var(--ink);
    border-color: var(--line);
}

.nav-link.active {
    color: #161513;
    background: var(--acc-yellow);
    border-color: #161513;
    box-shadow: 2px 2px 0 var(--shadow);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.theme-toggle {
    background: var(--card);
    border: 2px solid var(--line);
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ink);
    box-shadow: 3px 3px 0 var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.theme-toggle:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--shadow);
}

:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
:root[data-theme="light"] .icon-sun { display: block; }
:root[data-theme="light"] .icon-moon { display: none; }

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.btn-nav {
    padding: 9px 18px;
    font-size: 0.78rem;
}

.mobile-menu-btn {
    display: none;
    background: var(--card);
    border: 2px solid var(--line);
    border-radius: 10px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    cursor: pointer;
    box-shadow: 3px 3px 0 var(--shadow);
}

.mobile-menu-btn .icon-close {
    display: none;
}

/* --- Hero --- */
.hero-section {
    min-height: 100vh;
    padding-top: 110px;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card);
    border: 2px solid var(--line);
    box-shadow: 3px 3px 0 var(--shadow);
    padding: 6px 16px;
    margin-bottom: 28px;
    transform: rotate(-1deg);
}

.badge-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--acc-green);
    border: 2px solid var(--line);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); }
}

.badge-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-title {
    font-size: 3.9rem;
    margin-bottom: 22px;
}

.hero-title .mark {
    box-shadow: 6px 6px 0 var(--shadow);
}

.hero-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--ink-soft);
    margin-bottom: 22px;
}

.typewriter {
    color: var(--ink);
    font-weight: 700;
    border-bottom: 4px solid var(--acc-pink);
}

.cursor {
    animation: blink 0.8s infinite;
    color: var(--ink);
    font-weight: 700;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-description {
    font-size: 1.12rem;
    color: var(--ink-soft);
    margin-bottom: 36px;
    max-width: 560px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 44px;
}

.hero-socials {
    display: flex;
    align-items: center;
    gap: 16px;
}

.social-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-icon-link {
    background: var(--card);
    border: 2px solid var(--line);
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    box-shadow: 3px 3px 0 var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.social-icon-link svg {
    width: 19px;
    height: 19px;
}

.social-icon-link:hover {
    background: var(--acc-yellow);
    color: #161513;
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--shadow);
}

/* Hero right column: code window */
.hero-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

.visual-card-wrapper {
    position: relative;
    width: 100%;
    max-width: 480px;
}

.visual-card {
    background: #14121a;
    border: 2px solid var(--line);
    border-radius: 12px;
    box-shadow: 8px 8px 0 var(--shadow);
    overflow: hidden;
}

.card-header {
    background: #1e1b27;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 2px solid rgba(243, 238, 224, 0.15);
}

.window-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.35);
}

.window-dot.red { background-color: #ff5f56; }
.window-dot.yellow { background-color: #ffbd2e; }
.window-dot.green { background-color: #27c93f; }

.window-title {
    margin-left: 10px;
    font-size: 0.8rem;
    font-family: 'IBM Plex Mono', monospace;
    color: #8e8a9b;
}

.card-body-code {
    padding: 24px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.86rem;
    color: #d6d2c4;
    overflow-x: auto;
}

.code-keyword { color: #ff90b3; }
.code-class { color: #c0a8ff; }
.code-method { color: #7aa2ff; }
.code-string { color: #5ee0a0; }
.code-number { color: #ffd23f; }
.code-variable { color: #d6d2c4; }
.code-comment { color: #767288; font-style: italic; }

/* Floating sticker badges */
.floating-badge {
    position: absolute;
    background: var(--acc-yellow);
    color: #161513;
    border: 2px solid #161513;
    border-radius: 10px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 5px 5px 0 var(--shadow);
}

.floating-badge svg {
    width: 24px;
    height: 24px;
}

.badge-top-right {
    top: -22px;
    right: -16px;
    transform: rotate(3deg);
    animation: floatCard 6s infinite alternate ease-in-out;
}

.badge-bottom-left {
    bottom: -22px;
    left: -16px;
    background: var(--acc-pink);
    transform: rotate(-2.5deg);
    animation: floatCard 6s infinite alternate-reverse ease-in-out;
}

@keyframes floatCard {
    0% { translate: 0 0; }
    100% { translate: 0 -10px; }
}

.badge-number {
    display: block;
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.05rem;
}

.badge-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* --- Marquee Strip --- */
.marquee-wrap {
    overflow: hidden;
    padding: 30px 0;
}

.marquee-strip {
    background: var(--ink);
    color: var(--paper);
    border-top: 2px solid var(--line);
    border-bottom: 2px solid var(--line);
    transform: rotate(-1.2deg) scale(1.03);
    overflow: hidden;
    padding: 13px 0;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
}

.marquee-track > span {
    display: flex;
    align-items: center;
    gap: 40px;
    padding-right: 40px;
    font-family: 'Archivo Black', sans-serif;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.marquee-track .sep {
    color: var(--acc-yellow);
}

@keyframes marquee {
    to { transform: translateX(-50%); }
}

/* --- Skills --- */
.skills-section {
    background-color: var(--paper-2);
    border-top: 2px solid var(--line);
    border-bottom: 2px solid var(--line);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.skill-category-card {
    background: var(--card);
    border: 2px solid var(--line);
    border-radius: 14px;
    padding: 28px;
    box-shadow: 6px 6px 0 var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skill-category-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 9px 9px 0 var(--shadow);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.category-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 2px solid #161513;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #161513;
    flex-shrink: 0;
}

.category-icon-wrapper svg {
    width: 22px;
    height: 22px;
}

.lang-icon { background: var(--acc-yellow); }
.web-icon { background: var(--acc-blue); }
.db-icon { background: var(--acc-green); }
.ai-icon { background: var(--acc-pink); }
.data-icon { background: var(--acc-purple); }
.tools-icon { background: var(--acc-red); }

.category-header h3 {
    font-size: 1.05rem;
}

.skill-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.skill-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 2px dashed var(--grid);
}

.skill-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.skill-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.skill-level {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--paper-2);
    border: 2px solid var(--line);
    color: var(--ink);
    padding: 2px 9px;
    border-radius: 6px;
    white-space: nowrap;
}

/* --- Projects --- */
.filter-controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 50px;
}

.filter-btn {
    background: var(--card);
    border: 2px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    padding: 9px 22px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    box-shadow: 3px 3px 0 var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.filter-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--shadow);
}

.filter-btn.active {
    background: var(--ink);
    color: var(--paper);
}

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

.project-card {
    background: var(--card);
    border: 2px solid var(--line);
    border-radius: 16px;
    box-shadow: 7px 7px 0 var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 10px 10px 0 var(--shadow);
}

.project-banner {
    height: 130px;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    color: #161513;
    border-bottom: 2px solid var(--line);
    position: relative;
    overflow: hidden;
}

.project-index {
    position: absolute;
    bottom: -28px;
    right: 14px;
    font-family: 'Archivo Black', sans-serif;
    font-size: 6.2rem;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px rgba(22, 21, 19, 0.55);
    pointer-events: none;
}

.project-type {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--paper);
    color: var(--ink);
    padding: 4px 12px;
    border: 2px solid var(--line);
    border-radius: 6px;
}

.project-year {
    font-family: 'Archivo Black', sans-serif;
    font-size: 0.9rem;
    background: #161513;
    color: #f6f1e7;
    padding: 4px 10px;
    border-radius: 6px;
}

.banner-smartsip { background: var(--acc-blue); }
.banner-budget { background: var(--acc-green); }
.banner-facemask { background: var(--acc-purple); }
.banner-credit { background: var(--acc-pink); }

.project-content {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-card-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.project-card-description {
    color: var(--ink-soft);
    font-size: 0.97rem;
    margin-bottom: 22px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--paper-2);
    border: 2px solid var(--line);
    color: var(--ink);
    padding: 3px 10px;
    border-radius: 6px;
}

.project-metrics {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    background: var(--paper-2);
    border: 2px solid var(--line);
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 22px;
}

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

.metric-value {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1rem;
}

.metric-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

/* Expandable drawer */
.project-details-drawer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.project-details-drawer.active {
    max-height: 640px;
}

.drawer-inner {
    padding-top: 22px;
    border-top: 2px dashed var(--line);
    margin-top: 22px;
}

.drawer-inner h4 {
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.drawer-inner ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drawer-inner li {
    font-size: 0.9rem;
    color: var(--ink-soft);
    position: relative;
    padding-left: 18px;
    line-height: 1.5;
}

.drawer-inner li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--ink);
    font-weight: 700;
}

.btn-toggle-details svg {
    transition: transform 0.3s ease;
}

.btn-toggle-details.active svg {
    transform: rotate(180deg);
}

/* --- Education & Credentials (Timeline) --- */
.education-section {
    background-color: var(--paper-2);
    border-top: 2px solid var(--line);
    border-bottom: 2px solid var(--line);
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 40px auto 0 auto;
}

.timeline-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background-color: var(--line);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 44px;
    display: flex;
    flex-direction: column;
}

.timeline-left {
    left: 0;
    align-items: flex-end;
}

.timeline-right {
    left: 50%;
    align-items: flex-start;
}

.timeline-dot {
    position: absolute;
    top: 32px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 2px solid #161513;
    background: var(--acc-yellow);
    color: #161513;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 3px 3px 0 var(--shadow);
    transform: rotate(-4deg);
    z-index: 10;
}

.dot-blue { background: var(--acc-blue); }
.dot-green { background: var(--acc-green); }

.timeline-dot svg {
    width: 20px;
    height: 20px;
}

.timeline-left .timeline-dot {
    right: -22px;
}

.timeline-right .timeline-dot {
    left: -22px;
}

.timeline-card {
    background: var(--card);
    border: 2px solid var(--line);
    border-radius: 14px;
    padding: 28px;
    box-shadow: 6px 6px 0 var(--shadow);
    width: 100%;
    max-width: 440px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.timeline-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 9px 9px 0 var(--shadow);
}

.timeline-header {
    margin-bottom: 14px;
}

.timeline-duration {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--acc-yellow);
    color: #161513;
    border: 2px solid #161513;
    padding: 3px 11px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.timeline-card h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.timeline-institution {
    font-size: 0.9rem;
    color: var(--ink-soft);
    font-weight: 600;
}

.timeline-body p {
    font-size: 0.95rem;
    color: var(--ink-soft);
}

.timeline-details {
    margin-top: 8px;
    font-size: 0.88rem !important;
}

.cert-verify-link {
    display: inline-block;
    margin-top: 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink);
    border-bottom: 2px solid var(--acc-blue);
    transition: background-color 0.15s ease;
}

.cert-verify-link:hover {
    background: var(--acc-blue);
    color: #161513;
}

.academic-stats {
    display: flex;
    gap: 24px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px dashed var(--grid);
}

.academic-stats .stat {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.05rem;
}

.stat-lbl {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

/* --- Interests --- */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.interest-card {
    background: var(--card);
    border: 2px solid var(--line);
    border-radius: 14px;
    padding: 28px;
    box-shadow: 6px 6px 0 var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.interest-card:nth-child(1) { transform: rotate(-0.8deg); }
.interest-card:nth-child(2) { transform: rotate(0.6deg); }
.interest-card:nth-child(3) { transform: rotate(-0.5deg); }

.interest-card:hover {
    transform: rotate(0deg) translate(-3px, -3px);
    box-shadow: 9px 9px 0 var(--shadow);
}

.interest-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    border: 2px solid #161513;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #161513;
    margin-bottom: 18px;
}

.interest-icon svg {
    width: 22px;
    height: 22px;
}

.interest-yellow { background: var(--acc-yellow); }
.interest-blue { background: var(--acc-blue); }
.interest-green { background: var(--acc-green); }

.interest-card h3 {
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.interest-card p {
    font-size: 0.93rem;
    color: var(--ink-soft);
}

/* --- Terminal --- */
.terminal-section {
    background-color: var(--paper-2);
    border-top: 2px solid var(--line);
    border-bottom: 2px solid var(--line);
}

.terminal-container {
    background: #14121a;
    border: 2px solid var(--line);
    border-radius: 14px;
    box-shadow: 8px 8px 0 var(--shadow);
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

.terminal-header {
    background: #1e1b27;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid rgba(243, 238, 224, 0.15);
}

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

.term-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.35);
}

.term-dot.close { background-color: #ff5f56; }
.term-dot.minimize { background-color: #ffbd2e; }
.term-dot.maximize { background-color: #27c93f; }

.terminal-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.82rem;
    color: #8e8a9b;
}

.terminal-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    color: #d6d2c4;
    background: rgba(243, 238, 224, 0.08);
    padding: 3px 10px;
    border-radius: 4px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5ee0a0;
    animation: pulseDot 2s infinite;
}

.terminal-body {
    padding: 24px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.88rem;
    color: #e2ded0;
    min-height: 380px;
    max-height: 480px;
    overflow-y: auto;
}

.terminal-line {
    margin-bottom: 8px;
    line-height: 1.5;
}

.system-msg { color: #8e8a9b; }
.term-command { color: #ffd23f; font-weight: 600; }

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.prompt {
    color: #5ee0a0;
    font-weight: 600;
}

#terminal-input {
    background: transparent;
    border: none;
    color: #ffffff;
    flex-grow: 1;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.88rem;
}

#terminal-input:focus,
#terminal-input:focus-visible {
    outline: none;
    box-shadow: none;
}

.cli-response {
    margin: 8px 0;
    color: #c9c5b6;
    line-height: 1.55;
    white-space: pre-wrap;
}

.cli-input { color: #ffffff; }
.cli-bold { color: #c0a8ff; font-weight: 600; }
.cli-success { color: #5ee0a0; }
.cli-warning { color: #ff9d6b; }

/* --- Contact --- */
.contact-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 44px;
    align-items: flex-start;
}

.contact-info-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: var(--card);
    border: 2px solid var(--line);
    border-radius: 14px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 5px 5px 0 var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--shadow);
}

.info-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    border: 2px solid #161513;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #161513;
    flex-shrink: 0;
}

.info-icon svg {
    width: 22px;
    height: 22px;
}

.icon-bg-blue { background: var(--acc-blue); }
.icon-bg-purple { background: var(--acc-purple); }
.icon-bg-green { background: var(--acc-green); }

.info-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.info-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.info-value {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--ink);
    overflow-wrap: anywhere;
}

a.info-value:hover {
    border-bottom: 2px solid var(--acc-yellow);
}

/* Form */
.contact-form-wrapper {
    background: var(--card);
    border: 2px solid var(--line);
    border-radius: 16px;
    padding: 36px;
    box-shadow: 8px 8px 0 var(--shadow);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-soft);
}

.form-group input, .form-group textarea {
    background: var(--paper);
    border: 2px solid var(--line);
    border-radius: 10px;
    padding: 13px 14px;
    color: var(--ink);
    font-size: 0.95rem;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    resize: vertical;
}

.form-group input::placeholder, .form-group textarea::placeholder {
    color: var(--muted);
}

.form-group input:focus, .form-group textarea:focus,
.form-group input:focus-visible, .form-group textarea:focus-visible {
    outline: none;
    box-shadow: 4px 4px 0 var(--acc-blue);
    transform: translate(-1px, -1px);
}

.btn-submit {
    align-self: flex-start;
    padding: 14px 34px;
}

/* --- Footer --- */
footer {
    background: var(--ink);
    color: var(--paper);
    border-top: 2px solid var(--line);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 72px 24px 40px 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 120px;
    align-items: start;
}

.footer-socials-col {
    justify-self: end;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.15rem;
    background: var(--acc-yellow);
    color: #161513;
    border: 2px solid #161513;
    padding: 4px 12px;
    transform: rotate(-1.5deg);
}

.footer-brand p {
    color: var(--paper);
    opacity: 0.75;
    font-size: 0.95rem;
    max-width: 320px;
}

.footer-links h4, .footer-socials-col h4 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 22px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.footer-links a {
    font-size: 0.95rem;
    opacity: 0.75;
    transition: opacity 0.15s ease;
}

.footer-links a:hover {
    opacity: 1;
    border-bottom: 2px solid var(--acc-yellow);
}

.social-links-footer {
    display: flex;
    gap: 14px;
}

.social-links-footer a {
    border: 2px solid var(--paper);
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--paper);
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.social-links-footer a svg {
    width: 20px;
    height: 20px;
}

.social-links-footer a:hover {
    background: var(--acc-yellow);
    border-color: var(--acc-yellow);
    color: #161513;
    transform: translate(-2px, -2px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 26px 24px;
    border-top: 2px solid rgba(246, 241, 231, 0.18);
    text-align: center;
}

:root[data-theme="dark"] .footer-bottom {
    border-top-color: rgba(23, 21, 28, 0.25);
}

.footer-bottom p {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    opacity: 0.65;
}

/* --- Floating Components --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: -70px; /* hidden until .show */
    background: var(--acc-yellow);
    color: #161513;
    width: 46px;
    height: 46px;
    border: 2px solid #161513;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 4px 4px 0 var(--shadow);
    z-index: 90;
    transition: right 0.4s ease, transform 0.15s ease;
}

.back-to-top.show {
    right: 30px;
}

.back-to-top:hover {
    transform: translate(-2px, -2px);
}

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--card);
    border: 2px solid var(--line);
    border-left: 7px solid var(--acc-green);
    border-radius: 10px;
    padding: 16px 22px;
    min-width: 300px;
    max-width: 380px;
    box-shadow: 5px 5px 0 var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s forwards ease-out;
}

@keyframes slideIn {
    0% { transform: translateX(-110%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

.toast.removing {
    animation: fadeOut 0.4s forwards ease-in;
}

@keyframes fadeOut {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(-110%); opacity: 0; }
}

.toast-icon {
    color: var(--acc-green);
    flex-shrink: 0;
}

.toast-icon svg, svg.toast-icon {
    width: 22px;
    height: 22px;
}

.toast-content h5 {
    font-size: 0.92rem;
    margin-bottom: 2px;
}

.toast-content p {
    font-size: 0.8rem;
    color: var(--ink-soft);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    .marquee-track {
        animation: none;
    }
    .floating-badge,
    .badge-dot,
    .pulse-dot {
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 56px;
        padding-top: 20px;
    }

    .hero-content {
        align-items: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-title {
        font-size: 3.1rem;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid {
        grid-template-columns: 1fr;
        max-width: 680px;
        margin: 0 auto;
    }

    .interests-grid {
        grid-template-columns: 1fr;
        max-width: 560px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2.1rem;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 76px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 76px);
        background: var(--paper);
        z-index: 99;
        transition: left 0.35s ease;
        padding: 40px 24px;
        border-top: 2px solid var(--line);
    }

    .nav-menu.open {
        left: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .nav-link {
        font-size: 1.05rem;
    }

    .btn-nav {
        display: none;
    }

    .floating-badge {
        display: none;
    }

    .timeline-bar {
        left: 24px;
    }

    .timeline-item {
        width: 100%;
        padding: 20px 0 20px 56px;
        align-items: flex-start !important;
    }

    .timeline-left,
    .timeline-right {
        left: 0;
    }

    .timeline-dot {
        left: 2px !important;
        right: auto !important;
    }

    .timeline-card {
        max-width: 100%;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-brand {
        align-items: center;
    }

    .footer-socials-col {
        justify-self: center;
    }

    .footer-brand p {
        max-width: 100%;
    }

    .social-links-footer {
        justify-content: center;
    }
}

@media (max-width: 580px) {
    .hero-title {
        font-size: 2.4rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn-btn {
        width: 100%;
    }

    .hero-socials {
        flex-direction: column;
        gap: 12px;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .toast-container {
        left: 16px;
        right: 16px;
    }

    .toast {
        min-width: 0;
        max-width: 100%;
    }
}
