/* ==========================================================================
   About — Sahan Silva
   Fonts match the homepage: Iskry (display) + Saira Semi Condensed (text)
   ========================================================================== */

@font-face {
    font-family: "Iskry";
    src: url("/fonts/iskry/Iskry-Bold.woff2") format("woff2"),
         url("/fonts/iskry/Iskry-Bold.woff") format("woff");
    font-weight: 700;
    font-display: swap;
}

:root {
    --bg: #000;
    --surface: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.1);
    --text: #f4f4f6;
    --muted: #a3a3b2;
    --accent: #fff;
    --soft: #d4d4d4;

    --font-display: "Iskry", "Saira Semi Condensed", system-ui, sans-serif;
    --font-body: "Saira Semi Condensed", system-ui, -apple-system, "Segoe UI", sans-serif;

    --fs-hero: clamp(56px, 9vw, 150px);
    --fs-h2: clamp(34px, 4.2vw, 64px);
    --fs-h2-col: clamp(24px, 2vw, 34px);
    --fs-lead: clamp(17px, 1.25vw, 20px);
    --fs-body: 17px;
    --fs-small: 14px;
    --fs-eyebrow: 13px;

    --gutter: clamp(20px, 5vw, 80px);
    --pad-left: 190px;   /* clears .left-menu */
    --pad-right: 96px;   /* clears .social-buttons */
    --header-h: 0px;   /* no header bar on this page */
    --section-pad: clamp(96px, 12vh, 160px);
}

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

html, body { height: 100%; width: 100%; }

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

a { color: inherit; }

.sr-only {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

#main { position: relative; overflow: hidden; }

/* ---------- Shared type ---------- */
h2, h3, .section-title, .role-list, .motto { font-family: var(--font-display); font-weight: 700; }

.eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: var(--fs-eyebrow);
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #a3a3a3;
}
.eyebrow span {
    color: #6b6b6b;
    font-variant-numeric: tabular-nums;
}
.eyebrow span::after {
    content: "";
    display: inline-block;
    width: 28px;
    height: 1px;
    margin-left: 12px;
    vertical-align: middle;
    background: currentColor;
    opacity: 0.6;
}
.center .eyebrow { justify-content: center; }

.section-title {
    font-size: var(--fs-h2);
    line-height: 1.02;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    margin-bottom: 32px;
    color: #fff;
}

p + p { margin-top: 1em; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: #fff; color: #000; }
.btn-solid:hover { background: #d4d4d4; }
.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.28); color: #fff; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { height: 52px; padding: 0 28px; font-size: 15px; }

/* ---------- Left quick nav ---------- */
.left-menu {
    position: fixed;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.left-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px 9px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.left-menu-item:hover, .left-menu-item:focus-visible {
    transform: translateX(6px);
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.1);
}
.left-menu-icon { width: 24px; height: 24px; display: block; opacity: 0.95; }
.left-menu-label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #e6eefc;
}

/* ---------- Right social buttons ---------- */
.social-buttons {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.social-btn {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    transition: transform 0.25s ease, filter 0.25s ease;
}
.social-btn:hover { transform: scale(1.12); filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.35)); }
.social-btn img { width: 42px; height: 42px; display: block; }

@media (max-height: 760px) {
    .social-buttons { gap: 6px; }
    .social-btn { width: 38px; height: 38px; }
    .social-btn img { width: 34px; height: 34px; }
}

/* ==========================================================================
   HERO + STAGE (sections that play over the pinned figure)
   ========================================================================== */
#hero {
    position: relative;
    height: 100vh;
    width: 100%;
}

canvas {
    position: relative;
    z-index: 9;
    display: block;
    width: 100vw;
    height: 100vh;
}

#loop {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-58%);
    display: flex;
    width: 100%;
    white-space: nowrap;
    font-family: var(--font-display);
    font-size: var(--fs-hero);
    line-height: 1;
    text-transform: uppercase;
    pointer-events: none;
}
.loop-line {
    padding-right: 0.4em;
    color: rgba(255, 255, 255, 0.92);
    animation: marquee 28s linear infinite;
}
.loop-line b { color: var(--accent);  }
.loop-line i { font-style: normal; color: var(--soft); }
.loop-line span { color: transparent; -webkit-text-stroke: 1.5px var(--accent); }

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

.hero-intro {
    position: absolute;
    z-index: 10;
    left: var(--gutter);
    bottom: 8vh;
    max-width: min(24vw, 340px);
    font-size: var(--fs-lead);
    line-height: 1.55;
    color: #d4d4dc;
}

.scroll-cue {
    position: absolute;
    z-index: 10;
    right: var(--pad-right);
    bottom: 8vh;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--fs-eyebrow);
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
}
.scroll-cue span {
    width: 1px;
    height: 44px;
    background: linear-gradient(var(--accent), transparent);
    animation: cue 1.8s ease-in-out infinite;
    transform-origin: top;
}
@keyframes cue {
    0% { transform: scaleY(0); }
    50% { transform: scaleY(1); }
    100% { transform: scaleY(1); opacity: 0; }
}

/* Text lives in the outer columns so the figure in the middle is never covered */
.stage-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: calc(var(--header-h) + 40px) var(--pad-right) 60px var(--pad-left);
}

.col { position: relative; z-index: 10; width: min(22vw, 330px); }
.col-right { text-align: left; }

.col h2 {
    font-size: var(--fs-h2-col);
    line-height: 1.1;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.col h2 em { font-style: normal; color: var(--accent); }
.col p { font-size: var(--fs-lead); color: #cfcfd8; }

.role-list { list-style: none; }
.role-list li {
    font-size: var(--fs-h2-col);
    line-height: 1.15;
    text-transform: uppercase;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.role-list li:last-child { border-bottom: 0; }

.motto {
    font-size: var(--fs-h2-col);
    line-height: 1.2;
    text-transform: uppercase;
    color: #fff !important;
}
.motto-sub {
    margin-top: 16px;
    font-size: var(--fs-small) !important;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--soft) !important;
}

.fact-list { list-style: none; margin-top: 16px; }
.fact-list li {
    position: relative;
    padding: 8px 0 8px 22px;
    font-size: var(--fs-lead);
    color: #dcdce3;
}
.fact-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.05em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    
}

/* ==========================================================================
   CONTENT SECTIONS
   ========================================================================== */
.content-section {
    position: relative;
    z-index: 11;
    padding: var(--section-pad) var(--pad-right) var(--section-pad) var(--pad-left);
    background: var(--bg);
}
.container {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
}
.container.narrow { max-width: 820px; }
.center { text-align: center; }
.section-head { margin-bottom: 56px; }

/* Experience */
.role-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 28px; }
.role-chips span {
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    font-size: var(--fs-small);
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #fff;
}
.lead-card {
    text-align: left;
    font-size: var(--fs-lead);
    color: #d4d4dc;
    padding: clamp(24px, 3vw, 36px);
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
}
.text-link {
    display: inline-block;
    margin-top: 28px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: var(--accent);
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px 32px;
}
.skills-category h3 {
    font-size: 16px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.skills-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: var(--fs-small);
    font-weight: 500;
    color: #dcdce6;
    background: var(--surface);
    border: 1px solid var(--border);
    white-space: nowrap;
    transition: all 0.2s ease;
}
.skill-tag:hover { border-color: var(--accent); color: #fff; background: rgba(255, 255, 255, 0.1); }
.core-specializations {
    margin-top: 72px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
    text-align: center;
}
.core-specializations h3 {
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 20px;
}
.core-specializations .skills-tags { justify-content: center; gap: 10px; }
.skill-tag.highlight {
    padding: 8px 16px;
    font-weight: 600;
    color: #fff;
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* Soft skills */
.soft-skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.soft-card {
    padding: clamp(24px, 3vw, 36px);
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.soft-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 50px rgba(255, 255, 255, 0.06);
}
.soft-card h3 {
    font-size: 22px;
    line-height: 1.2;
    text-transform: uppercase;
    margin-bottom: 12px;
    color: #fff;
}
.soft-card p { color: #cfcfd8; }

/* Philosophy */
#philosophy blockquote p {
    font-size: clamp(19px, 1.6vw, 24px);
    line-height: 1.6;
    color: #e2e8f0;
}
#philosophy blockquote p + p { margin-top: 1.2em; color: #a3a3a3; }

/* Beyond + CTA */
#beyond p { font-size: var(--fs-lead); color: #d4d4dc; }
.closing-line {
    margin-top: 32px !important;
    font-family: var(--font-display);
    font-size: clamp(22px, 2vw, 30px) !important;
    line-height: 1.2;
    text-transform: uppercase;
    color: #fff !important;
}
.cta {
    margin-top: clamp(80px, 12vh, 140px);
    padding: clamp(32px, 5vw, 56px);
    border-radius: 24px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
}
.cta h2 {
    font-size: clamp(28px, 3vw, 44px);
    line-height: 1.1;
    text-transform: uppercase;
    margin-bottom: 28px;
}
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.cta-socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 22px;
    margin-top: 32px;
}
.cta-socials a {
    font-size: var(--fs-small);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--muted);
}
.cta-socials a:hover { color: var(--accent); }

/* Encrypted text (encrypted-text.js) */
[data-encrypted-text] { display: block; }
.encrypted-text { font-family: "Courier New", monospace !important; letter-spacing: 0.5px; }
.revealed-text { font-family: var(--font-body) !important; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1200px) {
    .skills-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
    :root { --pad-left: 96px; --pad-right: 84px; }
    .left-menu-label { display: none; }
    .left-menu-item { padding: 10px; }
}

/* Phones & small tablets: the figure fills the screen, so text sits
   on a dark glass panel at the bottom instead of in side columns */
@media (max-width: 768px) {
    :root { --fs-body: 16px; --pad-left: var(--gutter); --pad-right: var(--gutter); }

    .left-menu {
        top: var(--header-h);
        left: 0;
        right: 0;
        transform: none;
        flex-direction: row;
        justify-content: center;
        gap: 8px;
        padding: 6px 0 8px;
        background: rgba(0, 0, 0, 0.92);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        backdrop-filter: blur(10px);
    }
    .left-menu-item { box-shadow: none; }
    .left-menu-item { padding: 8px; }
    .left-menu-item:hover { transform: translateY(2px); }
    .left-menu-icon { width: 20px; height: 20px; }
    .social-buttons { display: none; }

    .btn { height: 36px; padding: 0 16px; font-size: 13px; }
    .btn-lg { height: 48px; width: 100%; }

    #loop { top: 30%; }

    .hero-intro {
        left: var(--gutter);
        right: var(--gutter);
        bottom: 12vh;
        max-width: none;
        padding: 16px 18px;
        border-radius: 14px;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(10px);
    }
    .scroll-cue { bottom: 5vh; left: 50%; right: auto; transform: translateX(-50%); }

    .stage-section {
        flex-direction: column;
        justify-content: flex-end;
        gap: 16px;
        padding: calc(var(--header-h) + 70px) var(--gutter) 48px;
    }
    .col {
        width: 100%;
        padding: 20px;
        border-radius: 16px;
        background: rgba(0, 0, 0, 0.68);
        border: 1px solid var(--border);
        backdrop-filter: blur(12px);
    }
    .col p, .fact-list li { font-size: 16px; }

    .skills-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 20px; }
    .soft-skills-grid { grid-template-columns: 1fr; }
    .section-head { margin-bottom: 40px; }
    .cta-actions { flex-direction: column; }
}

@media (max-width: 480px) {
    .skills-grid { grid-template-columns: 1fr; }
    .skill-tag { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .loop-line, .scroll-cue span { animation: none; }
}
