/* Portfolio shell — refractspaces.com
   Dark / atmospheric, strong typography, generous spacing, fully responsive.
   The Trade Chart demo lives in its own iframe (trade-chart-demo/) so its
   CSS/JS never collide with this shell. */

:root {
    --bg:        #0c0d11;
    --bg-2:      #14161c;
    --panel:     #16181f;
    --border:    #262a33;
    --text:      #e7e9ee;
    --text-dim:  #9aa0ad;
    --accent:    #5bb0e6;   /* refracted-light cyan-blue */
    --accent-2:  #b98cff;   /* violet edge of the spectrum */
    --good:      #4caf50;
    --bad:       #ef5350;
    --maxw:      1100px;
    --radius:    14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
/* Compact on purpose: name + tagline sit above the fold, and the top of the
   Trade Chart section peeks below it — a slight scroll brings the chart full. */
.hero {
    position: relative;
    min-height: 49vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    /* Subtle atmospheric gradient (pure CSS — no image dependency). */
    background:
        radial-gradient(900px 600px at 16% 12%, rgba(91, 176, 230, 0.15), transparent 60%),
        radial-gradient(760px 520px at 92% 24%, rgba(185, 140, 255, 0.11), transparent 60%),
        linear-gradient(165deg, #0c0d11 0%, #101319 60%, #0b0c10 100%);
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 62%, var(--bg) 100%);
    pointer-events: none;
}
.hero__inner {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 56px);
}
.hero__eyebrow {
    margin: 0 0 18px;
    font-size: clamp(15px, 1.6vw, 18px);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
}
.hero__title {
    margin: 0;
    font-size: clamp(24px, 3.4vw, 40px);
    line-height: 1.14;
    font-weight: 700;
    letter-spacing: -0.02em;
    max-width: 100%;   /* span wide / horizontal — less vertical footprint */
}
.hero__accent { color: var(--text-dim); font-weight: 500; }
.hero__cue {
    display: inline-block;
    margin-top: clamp(28px, 5vh, 48px);
    font-size: 15px;
    letter-spacing: 0.04em;
    color: var(--text-dim);
}
.hero__cue span { display: inline-block; transition: transform 0.2s; }
.hero__cue:hover { text-decoration: none; color: var(--text); }
.hero__cue:hover span { transform: translateY(3px); }

/* ---------- Sections ---------- */
.section {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: clamp(56px, 9vh, 110px) clamp(20px, 5vw, 56px);
    border-bottom: 1px solid var(--border);
}
.section--text, .section--contact { padding-top: clamp(48px, 7vh, 84px); padding-bottom: clamp(48px, 7vh, 84px); }
.section__head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 26px;
}
.section__head h2 {
    margin: 0;
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 700;
    letter-spacing: -0.01em;
}
.section__tag {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 12px;
}
.section__copy {
    margin: 22px 0 0;
    max-width: 70ch;
    font-size: clamp(15px, 1.4vw, 17px);
    color: var(--text-dim);
}
.section__copy strong { color: var(--text); font-weight: 600; }

/* ---------- Trade Chart demo iframe ---------- */
/* Wider than the text sections (uses the horizontal space) and tall enough to
   fill the screen after a slight scroll. Smaller top padding lets it peek up
   under the compact hero. */
.section--demo {
    max-width: 1560px;
    padding-top: clamp(28px, 4vh, 48px);
    border-bottom: 1px solid var(--border);
}
.demo-frame {
    position: relative;
    width: 100%;
    height: min(90vh, 920px);
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 24px 60px -32px rgba(0, 0, 0, 0.8);
}
.demo-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.demo-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
/* `display:flex` above overrides the [hidden] attribute's display:none, so be
   explicit — otherwise the fallback overlays the live chart on desktop. */
.demo-fallback[hidden] { display: none; }
.demo-fallback {
    gap: 12px;
    text-align: center;
    padding: 28px;
    background: var(--bg-2);
}
.demo-fallback p { margin: 0; max-width: 42ch; color: var(--text-dim); }
.demo-fallback strong { color: var(--text); }

.btn {
    display: inline-block;
    margin-top: 8px;
    padding: 11px 20px;
    border: 1px solid var(--accent);
    border-radius: 10px;
    color: var(--accent);
    font-weight: 600;
    background: transparent;
    transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--accent); color: #07121b; text-decoration: none; }

/* ---------- Media (videos): bigger video left, Catalyst/Result right ---------- */
/* Wider than the text sections, with tighter side padding, so the video is
   large and uses the horizontal space. */
.section--media {
    max-width: 1620px;
    padding-left: clamp(16px, 2.5vw, 40px);
    padding-right: clamp(16px, 2.5vw, 40px);
}
.media-row {
    display: grid;
    grid-template-columns: 1.85fr 1fr;
    gap: clamp(24px, 3vw, 48px);
    align-items: center;
}
.media-row .section__copy { margin-top: 0; }

/* Catalyst / Result blocks (right column of each media row) */
.cr { display: flex; flex-direction: column; gap: 22px; }
.cr__label {
    margin: 0 0 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    font-weight: 700;
}
.cr__block p {
    margin: 0;
    color: var(--text-dim);
    font-size: clamp(15px, 1.3vw, 17px);
}

/* Trade Chart copy: full chart width, Catalyst | Result side by side. */
.cr--wide {
    flex-direction: row;
    gap: clamp(28px, 4vw, 64px);
    margin-top: 28px;
}
.cr--wide .cr__block { flex: 1 1 0; }
@media (max-width: 880px) {
    .cr--wide { flex-direction: column; }
}

.media {
    position: relative;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    box-shadow: 0 24px 60px -36px rgba(0, 0, 0, 0.8);
}
.media__video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 76vh;
    object-fit: contain;
    background: #000;
}
.media__unmute {
    position: absolute;
    bottom: 14px;
    right: 14px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(12, 13, 17, 0.82);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.15s, border-color 0.15s;
}
.media__unmute:hover { border-color: var(--accent); }
.media__unmute[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

/* ---------- Accomplishments ---------- */
.section__intro { color: var(--text); max-width: 80ch; }
.muted { color: var(--text-dim); }
.accomplishments {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}
.accomplishment {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
    padding: clamp(20px, 3vw, 30px);
}
.accomplishment h3 {
    margin: 0 0 14px;
    font-size: clamp(17px, 1.8vw, 21px);
    font-weight: 700;
    letter-spacing: -0.01em;
}
.accomplishment p {
    margin: 10px 0 0;
    color: var(--text-dim);
    max-width: 90ch;
}
.acc-label {
    display: inline-block;
    min-width: 96px;
    margin-right: 10px;
    color: var(--accent);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    vertical-align: baseline;
}

/* ---------- Contact ---------- */
.contact { display: flex; flex-wrap: wrap; gap: 14px; }
.contact__link {
    font-size: 16px;
    font-weight: 600;
    padding: 12px 20px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s, color 0.15s;
}
.contact__link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---------- Footer ---------- */
.footer {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 36px clamp(20px, 5vw, 56px) 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: var(--text-dim);
    font-size: 14px;
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
    .media-row { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .demo-frame { height: auto; min-height: 320px; }
    .section__head { flex-direction: column; gap: 8px; align-items: flex-start; }
    .footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero__cue span { transition: none; }
}
