/* ==========================================================================
   AAAIR PORTFOLIO — ARCHITECTURAL EDITORIAL DESIGN SYSTEM (v4.0)
   Bespoke, High-Contrast Swiss/Editorial Aesthetic
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── 0. DESIGN TOKENS ── */
:root {
    /* Base Architectural Palette (Matte, High-Contrast) */
    --bg-main: #0B0C0E;
    --bg-card: #121418;
    --bg-card-hover: #181B21;
    --bg-subtle: #1C2027;

    /* Editorial Accent Hierarchy */
    --accent-amber: #E5A93C;
    --accent-amber-subtle: rgba(229, 169, 60, 0.12);
    --accent-steel: #81A1C1;
    --accent-crimson: #E06C75;

    /* High-Legibility Typography Colors */
    --text-heading: #F8F9FA;
    --text-body: #D1D5DB;
    --text-muted: #9CA3AF;
    --text-faint: #6B7280;

    /* Precision Hairline Borders */
    --border-line: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.18);
    --border-amber: rgba(229, 169, 60, 0.4);

    /* Typography */
    --font-display: 'Space Grotesk', -apple-system, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Geometry & Transitions */
    --wrap-width: 1000px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── 1. BASE RESET ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
    background-color: var(--bg-main);
}

body,
#body,
.page-body {
    margin: 0;
    background: var(--bg-main);
    color: var(--text-body);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.65;
    min-height: 100vh;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--accent-amber);
    color: #000000;
}

/* Subtle Architectural Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: #262A33;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3B4252;
}

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

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

/* ── 2. ARCHITECTURAL GRID BACKGROUND (Clean Hairline Mesh, No Blurs) ── */
#bg-layer,
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
}

/* ── 3. MAIN CONTAINER ── */
#layout-wrapper,
.layout-wrapper {
    max-width: var(--wrap-width);
    margin: 0 auto;
    padding: 0 24px 100px;
    position: relative;
    z-index: 1;
}

/* ── 4. HERO SECTION (Editorial Layout) ── */
#header,
.header-container {
    position: relative;
    width: 100%;
}

#hero-section,
.hero-section {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 64px;
    padding: 96px 24px 72px;
    background: #0E1014;
    border-bottom: 1px solid var(--border-strong);
}

#hero-bg-layer,
.hero-bg-layer {
    display: none;
    /* Removed glow blobs & canvas overlays */
}

#hero-container,
.hero-container {
    position: relative;
    z-index: 1;
    max-width: var(--wrap-width);
    margin: 0 auto;
}

#header-inner,
.header-inner,
.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
}

/* Status Badge */
#hero-status-badge,
.hero-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-heading);
}

#hero-status-pulse,
.hero-status-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #A3BE8C;
}

#hero-status-text,
.hero-status-text {
    font-weight: 500;
}

#hero-status-divider,
.hero-status-divider {
    color: var(--text-faint);
}

#hero-status-location,
.hero-status-location {
    color: var(--accent-amber);
}

/* Hero Typography */
#hero-typography-stack,
.hero-typography-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 820px;
}

#title,
.title,
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7.5vw, 5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--text-heading);
}

#hero-name-first,
.hero-name-first {
    color: var(--text-heading);
}

#hero-name-last,
.hero-name-last {
    color: var(--accent-amber);
}

#hero-role-wrapper,
.hero-role-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text-muted);
}

#hero-role-prefix,
.hero-role-prefix {
    color: var(--text-faint);
}

#hero-role-text,
.hero-role-text {
    color: var(--text-heading);
    font-weight: 500;
}

#subtitle,
.subtitle,
.hero-bio {
    font-size: 1.08rem;
    line-height: 1.75;
    color: var(--text-body);
    max-width: 64ch;
    margin-top: 4px;
}

/* Clean Terminal / Metadata Widget */
#hero-widget-card,
.hero-widget-card {
    width: 100%;
    max-width: 520px;
    margin-top: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

#hero-terminal-header,
.hero-terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #161920;
    border-bottom: 1px solid var(--border-line);
}

#hero-terminal-controls,
.hero-terminal-controls {
    display: flex;
    gap: 6px;
}

.terminal-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #2E3440;
}

#hero-dot-red,
.dot-red {
    background: #BF616A;
}

#hero-dot-yellow,
.dot-yellow {
    background: #EBCB8B;
}

#hero-dot-green,
.dot-green {
    background: #A3BE8C;
}

#hero-terminal-title,
.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

#hero-terminal-body,
.hero-terminal-body {
    padding: 18px 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
}

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

.terminal-prompt {
    color: var(--accent-amber);
}

.terminal-cmd {
    color: var(--text-heading);
}

.terminal-output {
    color: var(--text-muted);
}

/* CTA Bar */
#hero-cta-bar,
.hero-cta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

#hero-cta-contact,
.hero-btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 12px 26px;
    font-family: var(--font-mono);
    font-size: 0.84rem;
    font-weight: 600;
    color: #000000;
    background: var(--accent-amber);
    border: 1px solid var(--accent-amber);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s var(--ease-out);
}

#hero-cta-contact:hover,
.hero-btn-primary:hover {
    background: #F0B84D;
}

#hero-cta-comments,
.hero-btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 12px 26px;
    font-family: var(--font-mono);
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-heading);
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.2s var(--ease-out);
}

#hero-cta-comments:hover,
.hero-btn-secondary:hover {
    border-color: var(--text-heading);
}

#hero-btn-copy-email,
.hero-btn-icon {
    display: inline-flex;
    align-items: center;
    padding: 12px 18px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

#hero-btn-copy-email:hover,
.hero-btn-icon:hover {
    color: var(--accent-amber);
    border-color: var(--border-amber);
}

/* Social Links Bar */
/* ── DUAL MARQUEE LINK BANNER (Reference Matching) ── */
#hero-social-wrapper,
.hero-social-wrapper,
.marquee-container {
    width: 100%;
    margin-top: 20px;
    padding: 14px 0;
    background: #0E1015;
    border: 1px solid var(--border-line);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;

    /* Fading Edge Vignette (Identical to reference screenshot) */
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 12%, black 88%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, black 12%, black 88%, transparent 100%);
}

.marquee-row {
    display: flex;
    overflow: hidden;
    width: 100%;
    margin-bottom: 8px;
    user-select: none;
}

.marquee-row:last-child {
    margin-bottom: 0;
}

.marquee-track {
    display: flex;
    gap: 10px;
    width: max-content;
    will-change: transform;
}

/* Forward Row: Right to Left */
.marquee-forward .marquee-track {
    animation: marquee-left 28s linear infinite;
}

/* Reverse Row: Left to Right */
.marquee-reverse .marquee-track {
    animation: marquee-right 28s linear infinite;
}

/* Pause marquee animation on hover */
.marquee-row:hover .marquee-track {
    animation-play-state: paused;
}

@keyframes marquee-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

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

    100% {
        transform: translateX(0);
    }
}

/* Pill Box Styling (Matching Reference Screenshot) */
.social-link,
.marquee-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(22, 26, 35, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-heading);
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.social-link:hover,
.marquee-pill:hover {
    background: rgba(35, 43, 58, 0.95);
    border-color: rgba(229, 169, 60, 0.5);
    color: #FFFFFF;
}

.tag-bracket {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.8rem;
    font-weight: 500;
}

.tag-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.brand-svg {
    display: block;
    fill: currentColor;
}

.social-link:hover .tag-svg,
.marquee-pill:hover .tag-svg {
    color: var(--accent-amber);
}

.tag-label {
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Quick Stats Bar */
#hero-quick-stats,
.hero-quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    width: 100%;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-line);
}

.hero-stat-box {
    padding: 16px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-sm);
}

.hero-stat-val {
    display: block;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-heading);
}

.hero-stat-lbl {
    display: block;
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-faint);
}

#hero-scroll-indicator,
.hero-scroll-indicator {
    display: none;
    /* Removed extra floating arrow */
}

/* ── 5. MAIN CONTENT & SECTIONS ── */
#main-content,
.content-container {
    position: relative;
    z-index: 1;
}

#section-grid,
.section-grid {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.section-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-md);
    padding: 36px 40px;
    transition: border-color 0.25s var(--ease-out);
}

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

.section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.01em;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-line);
}

.composite-title {
    font-family: var(--font-display);
    font-size: 1.18rem;
    font-weight: 600;
    color: var(--accent-amber);
    margin: 28px 0 14px;
    padding-top: 18px;
    border-top: 1px dashed var(--border-line);
}

.composite-title:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* ── 6. ITEM BLOCKS ── */
.item-block {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-line);
}

.item-block:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.item-label {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-heading);
}

.item-detail {
    font-size: 0.94rem;
    font-weight: 500;
    color: var(--accent-amber);
    margin-top: 3px;
}

.item-sub {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.item-desc {
    font-size: 0.94rem;
    color: var(--text-body);
    line-height: 1.7;
    margin-top: 8px;
    max-width: 68ch;
}

.item-highlight {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 4px 12px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--accent-amber);
    background: var(--accent-amber-subtle);
    border: 1px solid var(--border-amber);
    border-radius: var(--radius-sm);
}

.item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.model-viewer {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    min-height: 240px;
    max-height: 460px;
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid var(--border-line);
    background: #0E1014;
}

.model-viewer canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.model-viewer-status {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.ai-chat-answer {
    min-height: 1.65em;
    margin-bottom: 12px;
    white-space: pre-wrap;
}

.ai-chat-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
}

.ai-chat-form .form-label {
    flex-basis: 100%;
}

.ai-chat-form .form-input {
    flex: 1 1 14rem;
    min-width: 0;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-heading);
    background: var(--bg-subtle);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.action-btn:hover {
    color: var(--accent-amber);
    border-color: var(--border-amber);
}

/* Sub-Grid for Test Scores */
.sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.sub-item {
    padding: 16px 18px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-sm);
}

[id^="sub-item-label-"] {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

[id^="sub-item-detail-"] {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-heading);
}

/* Composite Items */
[id^="composite-item-4-"] {
    padding: 10px 0;
}

[id^="composite-label-4-"] {
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--text-heading);
}

[id^="composite-detail-4-"] {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── 7. LIVE STATS SECTION ── */
#stats-section,
.stats-section {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
}

#stats-wrapper,
.stats-wrapper {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 20px;
}

.stats-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.github-contribution-graph {
    overflow-x: auto;
    padding-top: 8px;
}

.github-contribution-calendar {
    width: 100%;
    margin-top: 12px;
    padding: 14px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    color: var(--text-muted);
}

.github-contribution-calendar table {
    min-width: 680px;
    width: 100%;
    border-spacing: 3px;
    font-size: 0.72rem;
}

.github-contribution-calendar td {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.github-contribution-calendar .ContributionCalendar-day {
    background: #30363d;
}

.github-contribution-calendar .ContributionCalendar-day[data-level="1"] { background: #0e4429; }
.github-contribution-calendar .ContributionCalendar-day[data-level="2"] { background: #006d32; }
.github-contribution-calendar .ContributionCalendar-day[data-level="3"] { background: #26a641; }
.github-contribution-calendar .ContributionCalendar-day[data-level="4"] { background: #39d353; }

.platform-activity {
    overflow-x: auto;
    padding-top: 8px;
}

.activity-calendar {
    display: grid;
    grid-template-columns: repeat(53, 12px);
    grid-auto-flow: column;
    grid-template-rows: repeat(7, 12px);
    gap: 3px;
    width: 100%;
    max-width: 100%;
    margin-top: 12px;
    padding: 14px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-sm);
}

.activity-day {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: #30363d;
    cursor: help;
    transition: transform 120ms ease, outline-color 120ms ease;
}

.activity-day:hover,
.github-contribution-calendar td.ContributionCalendar-day:hover {
    transform: scale(1.35);
    outline: 2px solid var(--accent-amber);
    outline-offset: 1px;
    position: relative;
    z-index: 2;
}

.activity-level-1 { background: #0e4429; }
.activity-level-2 { background: #006d32; }
.activity-level-3 { background: #26a641; }
.activity-level-4 { background: #39d353; }

.activity-skeleton {
    display: grid;
    grid-template-columns: repeat(18, 12px);
    grid-template-rows: repeat(2, 12px);
    gap: 4px;
    min-height: 28px;
    overflow: hidden;
}

.activity-skeleton span {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: var(--border-line);
    animation: stats-skeleton-pulse 1.4s ease-in-out infinite;
}

.activity-skeleton span:nth-child(3n) { animation-delay: 0.18s; }
.activity-skeleton span:nth-child(3n + 1) { animation-delay: 0.36s; }

@keyframes stats-skeleton-pulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}

[id^="stats-label-"],
.stats-block .item-label,
.platform-activity .item-label {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-heading);
    text-decoration: none;
}

.stats-summary {
    padding: 16px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 12px 0 10px;
}

.summary-value {
    padding: 12px;
    border: 1px solid var(--border-line);
    border-radius: var(--radius-sm);
}

.summary-value strong,
.summary-value span {
    display: block;
}

.summary-value strong {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--accent-amber);
}

.summary-value span,
.stats-summary small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

[id^="stats-grid-"],
.stats-box-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

[id^="stat-cell-"],
.stat-cell {
    padding: 18px 14px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-sm);
    text-align: center;
}

.stat-skeleton span {
    display: block;
    height: 14px;
    margin: 5px auto;
    border-radius: var(--radius-sm);
    background: var(--border-line);
    animation: stats-skeleton-pulse 1.4s ease-in-out infinite;
}

.stat-skeleton span:first-child {
    width: 58%;
    height: 24px;
}

.stat-skeleton span:last-child {
    width: 72%;
}

[id^="stat-num-"],
.stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-amber);
}

[id^="stat-key-"],
.stat-key {
    display: block;
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
}

/* ── 8. FORMS (Contact & Comment) ── */
#contact-section,
.contact-section,
#comment-section,
.comment-section {
    background: var(--bg-card);
}

#contact-form,
#comment-form,
.contact-form,
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 4px;
}

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

.form-label {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.form-input,
.form-textarea {
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 12px 16px;
    background: var(--bg-subtle);
    color: var(--text-heading);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.2s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-faint);
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--accent-amber);
}

select.form-input {
    cursor: pointer;
}

select.form-input option {
    background-color: var(--bg-card);
    color: var(--text-heading);
}

.form-textarea {
    resize: vertical;
    min-height: 110px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

#contact-submit-btn,
#comment-submit-btn,
.contact-submit-btn,
.comment-submit-btn {
    padding: 12px 30px;
    font-family: var(--font-mono);
    font-size: 0.84rem;
    font-weight: 600;
    color: #000000;
    background: var(--accent-amber);
    border: 1px solid var(--accent-amber);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s ease;
}

#contact-submit-btn:hover,
#comment-submit-btn:hover {
    background: #F0B84D;
}

#contact-submit-btn:disabled,
#comment-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

#contact-status,
#comment-status,
.contact-status {
    min-height: 1.2em;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    margin-top: 4px;
}

.status-success {
    color: #A3BE8C;
}

.status-error {
    color: #BF616A;
}

.status-pending {
    color: #EBCB8B;
}

/* ── 9. COMMENTS DISPLAY SECTION ── */
#comments-display-section,
.comments-display-section {
    background: var(--bg-card);
}

#comments-display-status,
.comments-display-status {
    text-align: center;
    padding: 20px 0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-faint);
}

#comments-display-list,
.comments-display-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comment-card {
    padding: 20px 22px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s ease;
}

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

.comment-card-new {
    border-color: var(--accent-amber);
}

.comment-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.comment-avatar {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--border-strong);
}

.comment-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background-color: var(--bg-card);
}

.comment-meta {
    display: flex;
    flex-direction: column;
}

.comment-name {
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--text-heading);
}

.comment-position {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--text-muted);
}

.comment-body {
    margin: 0;
    padding-left: 14px;
    border-left: 2px solid var(--accent-amber);
    font-size: 0.94rem;
    line-height: 1.65;
    color: var(--text-body);
}

/* ── 10. NOSCRIPT & RESPONSIVE ── */
#noscript-overlay,
.noscript-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    background: var(--bg-main);
}

#noscript-title,
.noscript-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: #BF616A;
    margin-bottom: 14px;
}

#noscript-text,
.noscript-text {
    font-size: 1rem;
    color: var(--text-body);
    max-width: 440px;
}

@media (max-width: 768px) {

    .stats-box-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .stat-cell {
        min-width: 0;
        padding: 14px 8px;
    }

    .stat-num {
        font-size: 1.2rem;
        overflow-wrap: anywhere;
    }

    .github-contribution-calendar,
    .activity-calendar {
        padding: 10px;
    }

    #layout-wrapper,
    .layout-wrapper {
        padding: 0 16px 60px;
    }

    #hero-section,
    .hero-section {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        border-radius: var(--radius-md);
        padding: 48px 20px 36px;
        margin-bottom: 32px;
    }

    #hero-status-badge,
    .hero-status-badge {
        flex-wrap: wrap;
        font-size: 0.74rem;
        padding: 6px 12px;
        max-width: 100%;
    }

    #title,
    .title {
        font-size: clamp(2.2rem, 8.5vw, 3.2rem);
        word-break: break-word;
        overflow-wrap: break-word;
    }

    #hero-role-wrapper,
    .hero-role-wrapper {
        font-size: 0.95rem;
    }

    #subtitle,
    .subtitle,
    .hero-bio {
        font-size: 0.98rem;
    }

    #hero-widget-card,
    .hero-widget-card {
        max-width: 100%;
        width: 100%;
    }

    .terminal-line,
    .terminal-output {
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    #hero-cta-bar,
    .hero-cta-bar {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    #hero-cta-contact,
    #hero-cta-comments,
    .hero-btn-primary,
    .hero-btn-secondary,
    #hero-btn-copy-email,
    .hero-btn-icon {
        width: 100%;
        justify-content: center;
    }

    #hero-quick-stats,
    .hero-quick-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .section-card {
        padding: 24px 18px;
    }

    .form-input,
    .form-textarea {
        font-size: 16px;
        /* Prevents auto-zoom on iOS Safari */
    }

    .form-actions {
        justify-content: stretch;
    }

    #contact-submit-btn,
    #comment-submit-btn,
    .contact-submit-btn,
    .comment-submit-btn {
        width: 100%;
    }

    [id^="stats-grid-"],
    .stats-box-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 480px) {

    #layout-wrapper,
    .layout-wrapper {
        padding: 0 12px 48px;
    }

    #hero-section,
    .hero-section {
        padding: 36px 14px 28px;
        margin-bottom: 24px;
    }

    #title,
    .title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    .section-card {
        padding: 20px 14px;
    }

    .social-link {
        font-size: 0.72rem;
        padding: 5px 10px;
    }

    .comment-card {
        padding: 16px 14px;
    }

    .comment-card-header {
        flex-wrap: wrap;
        gap: 10px;
    }
}