/* Course Plotted (V3) sections below the home page map. Every rule is scoped to .v3 so the cartoon hero and header keep their own skin. */
.v3 {
    --ink:     #0b0f14;
    --paper:   #f2f5f8;
    --ocean:   #0e3a5a;
    --wave:    #1a7da8;
    --foam:    #c8e8f5;
    --copper:  #c47c2f;
    --rust:    #d65c3a;
    --mist:    #e8eef3;
    --muted:      #5a6470;
    --muted-soft: #8a97a6;

    /* Darker copper for small text on light backgrounds (4.6:1 on --paper) */
    --copper-ink: #9b5e22;

    --serif: 'DM Serif Display', Georgia, serif;
    --sans:  'Syne', system-ui, sans-serif;
    --mono:  'JetBrains Mono', ui-monospace, monospace;

    --header-h: 72px;
    --gutter: clamp(16px, 4vw, 48px);
    --maxw: 1200px;
    --radius: 18px;
    --ease-out: cubic-bezier(.22, .8, .24, 1);
    --line-dark: rgba(200, 232, 245, .14);
    --line-light: rgba(14, 58, 90, .16);

    color: var(--ink);
    font: 400 1rem/1.6 var(--sans);
}
.v3 *, .v3 *::before, .v3 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.v3 img, .v3 svg { display: block; max-width: 100%; }
.v3 ul, .v3 ol { list-style: none; }
.v3 a { color: inherit; }
.v3 :focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; border-radius: 4px; }
.v3 .icon { width: 1.25em; height: 1.25em; flex: none; }
.v3 .wrap {
    width: 100%;
    max-width: calc(var(--maxw) + 2 * var(--gutter));
    margin-inline: auto;
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
}

/* The hero's chunky cartoon buttons are global, so their outline and drop shadow are cleared first. */
.v3 .btn { min-height: 0; border: 0; box-shadow: none; letter-spacing: normal; justify-content: flex-start; }
.v3 .btn:hover, .v3 .btn:active { box-shadow: none; }

/* Buttons */
.v3 .btn {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .9rem 1.6rem; border-radius: 999px;
    font: 700 .92rem/1 var(--sans); text-decoration: none;
    transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .25s var(--ease-out), box-shadow .25s ease;
}
.v3 .btn-primary { background: var(--wave); color: #fff; }
.v3 .btn-primary:hover { background: #1f8fc0; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(26, 125, 168, .35); }
.v3 .btn-outline { border: 1.5px solid rgba(244, 240, 232, .45); color: var(--paper); }
.v3 .btn-outline:hover { border-color: var(--paper); background: rgba(244, 240, 232, .08); transform: translateY(-2px); }
.v3 .btn:active { transform: translateY(0) scale(.97); }
.v3 .icon-btn { width: 1.15em; height: 1.15em; }


.v3 .logo {
    display: inline-flex; align-items: center; gap: .6rem;
    font: 400 1.25rem/1 var(--serif); color: var(--paper); text-decoration: none; white-space: nowrap;
}
.v3 .boat-logo { width: 38px; height: auto; }
.v3 .boat { width: 100%; height: auto; overflow: visible; }
.v3 .boat path { stroke: var(--ocean); stroke-width: 1.3; stroke-linejoin: round; }
.v3 .boat-hull { fill: var(--mist); }
.v3 .boat-sail-l { fill: var(--paper); }
.v3 .boat-sail-r { fill: #dfe7ee; }
.v3 .boat-fold { stroke-width: .8 !important; opacity: .55; }
.v3 .boat-logo path { stroke: var(--ink); }

/* Sections */
.v3 .section { position: relative; padding-block: clamp(4.5rem, 9vw, 7.5rem); }
.v3 .section-paper { background: var(--paper); }
.v3 .section-mist { background: var(--mist); }
.v3 .section-ink { background: var(--ink); color: var(--paper); }
.v3 .section-contact {
    background: linear-gradient(165deg, var(--ocean) 0%, #0b2438 55%, var(--ink) 100%);
    color: var(--paper);
    padding-bottom: calc(clamp(4.5rem, 9vw, 7.5rem) + env(safe-area-inset-bottom));
}

.v3 h2 { font: 400 clamp(2.2rem, 5vw, 3.6rem)/1.05 var(--serif); color: var(--ocean); margin-bottom: 1.2rem; }
.v3 .section-ink h2,
.v3 .section-contact h2,
.v3 .person-panel h2 { color: var(--paper); }
.v3 h3 { font-family: var(--serif); font-weight: 400; }

.v3 .kicker { margin-bottom: .55rem; font: italic 400 1.15rem/1.2 var(--serif); color: var(--copper-ink); }
.v3 .kicker-light { color: var(--copper); }

.v3 .section-head { max-width: 62ch; margin-bottom: clamp(2.2rem, 4vw, 3.2rem); }
.v3 .intro { line-height: 1.75; color: var(--muted); }
.v3 .section-ink .intro { color: rgba(244, 240, 232, .68); }

/* About */
.v3 .about-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.v3 .about-copy p { max-width: 60ch; margin-bottom: 1.1rem; line-height: 1.8; color: var(--muted); }
.v3 .about-copy p strong { color: var(--ocean); font-weight: 700; }
.v3 .chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.8rem; }
.v3 .chip { padding: .45rem .95rem; border: 1px solid var(--line-light); border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--ocean); background: rgba(255, 255, 255, .45); }

.v3 .gauge-card {
    position: relative; overflow: hidden;
    padding: clamp(1.8rem, 4vw, 2.8rem);
    border-radius: var(--radius);
    background: var(--ocean); color: var(--paper);
    box-shadow: 0 24px 50px -24px rgba(14, 58, 90, .6);
}
.v3 .gauge-card::before {
    content: ''; position: absolute; right: -30%; top: -40%; width: 90%; aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(26, 125, 168, .45), transparent);
    pointer-events: none;
}
.v3 .gauge-card > * { position: relative; }
.v3 .gauge-title { font-size: 2rem; line-height: 1.1; margin-bottom: 1.8rem; color: var(--paper); }
.v3 .gauge { margin-bottom: 1.35rem; }
.v3 .gauge:last-child { margin-bottom: 0; }
.v3 .gauge-head { display: flex; justify-content: space-between; margin-bottom: .5rem; font-size: .9rem; font-weight: 600; }
.v3 .gauge-head span:last-child { font: 400 .82rem var(--mono); color: var(--foam); }
.v3 .gauge-track { position: relative; display: block; height: 8px; border-radius: 999px; background: rgba(200, 232, 245, .12); overflow: hidden; }
.v3 .gauge-track::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(11, 15, 20, .35) calc(10% - 1px) 10%);
}
.v3 .gauge-fill {
    display: block; height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, var(--wave), var(--foam));
    transform-origin: left center; transform: scaleX(var(--v));
}
.v3.is-motion .gauge-fill { transform: scaleX(0); }

/* Person */
.v3 .person { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center; }
.v3 .person-photo { position: relative; grid-column: 1 / span 6; grid-row: 1; }
.v3 .person-photo::before {
    content: ''; position: absolute; inset: 1.4rem 1.4rem -1.4rem -1.4rem; z-index: 0;
    border: 2px solid var(--copper); border-top-color: transparent; border-right-color: transparent; border-radius: 30px;
}
.v3 .person-photo img { position: relative; z-index: 1; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 26px; }
.v3 .person-panel {
    position: relative; z-index: 2; grid-column: 6 / span 7; grid-row: 1;
    padding: clamp(1.8rem, 4vw, 3rem);
    border-radius: var(--radius);
    background: var(--ocean); color: var(--paper);
    box-shadow: 0 30px 60px -30px rgba(11, 15, 20, .55);
}
.v3 .person-panel p { margin-bottom: 1rem; line-height: 1.75; color: rgba(244, 240, 232, .8); }
.v3 .traits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem 1.2rem; margin-top: 1.5rem; padding-top: 1.3rem; border-top: 1px solid var(--line-dark); }
.v3 .trait { display: flex; align-items: center; gap: .65rem; padding-block: .4rem; font-size: .95rem; font-weight: 600; }
.v3 .icon-trait { width: 1.4rem; height: 1.4rem; color: var(--foam); }

/* Services legend */
.v3 .legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-light); }
.v3 .legend-item {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.25rem; align-items: start;
    padding: clamp(1.6rem, 3vw, 2.4rem) clamp(0rem, 2.5vw, 2.4rem) clamp(1.6rem, 3vw, 2.4rem) 0;
    border-bottom: 1px solid var(--line-light);
}
.v3 .legend-item:nth-child(odd) { border-right: 1px solid var(--line-light); }
.v3 .legend-item:nth-child(even) { padding-left: clamp(1.2rem, 2.5vw, 2.4rem); padding-right: 0; }
.v3 .legend-icon {
    display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
    border: 1.5px solid var(--wave); color: var(--wave);
}
.v3 .legend-icon .icon { width: 24px; height: 24px; }
.v3 .legend-item h3 { font-size: 1.5rem; line-height: 1.15; color: var(--ocean); margin-bottom: .5rem; }
.v3 .legend-item p { font-size: .95rem; line-height: 1.7; color: var(--muted); }

/* Projects */
.v3 .projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.v3 .project {
    display: flex; flex-direction: column;
    padding: clamp(1.5rem, 3vw, 2rem);
    border: 1px solid var(--line-dark); border-radius: var(--radius);
    background: rgba(14, 58, 90, .2);
    transition: border-color .25s ease, transform .3s var(--ease-out);
}
.v3 .project:hover { border-color: rgba(26, 125, 168, .7); transform: translateY(-3px); }
.v3 .project-meta { display: flex; align-items: center; justify-content: space-between; padding-bottom: 1rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--line-dark); }
.v3 .status { padding: .32rem .8rem; border-radius: 999px; font-size: .76rem; font-weight: 700; line-height: 1.2; border: 1.5px solid transparent; }
.v3 .status-active { background: var(--wave); color: #fff; }
.v3 .status-progress { background: var(--copper); color: var(--ink); }
.v3 .status-concept { border: 1.5px dashed var(--foam); color: var(--foam); }
.v3 .status-hold { border: 1.5px solid rgba(200, 232, 245, .4); color: rgba(244, 240, 232, .8); }
.v3 .project-year { font: 400 .8rem var(--mono); color: rgba(200, 232, 245, .6); }
.v3 .project h3 { font-size: 1.45rem; line-height: 1.2; margin-bottom: .7rem; color: var(--paper); }
.v3 .project p { flex: 1; margin-bottom: 1.3rem; font-size: .95rem; line-height: 1.7; color: rgba(244, 240, 232, .7); }
.v3 .project-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.v3 .embed { margin: -.3rem 0 1.3rem; }
.v3 .embed-frame { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--line-dark); border-radius: calc(var(--radius) - 6px); background: #05080c; }
.v3 .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.v3 .embed figcaption { margin-top: .6rem; font-size: .85rem; }
.v3 .embed figcaption a { color: var(--foam); font-weight: 700; text-underline-offset: 4px; }
.v3 .embed figcaption a:hover { color: var(--paper); }
.v3 .project-link {
    display: inline-flex; align-items: center; gap: .45rem; align-self: flex-start;
    min-height: 44px; margin-top: 1rem;
    font-weight: 700; font-size: .92rem; color: var(--foam); text-underline-offset: 4px;
}
.v3 .project-link:hover { color: var(--paper); }
.v3 .project-link:active { transform: scale(.97); }
.v3 .project-link .icon { width: 1.05rem; height: 1.05rem; transition: translate .25s var(--ease-out); }
.v3 .project-link:hover .icon { translate: 3px 0; }
.v3 .icon-right { rotate: -90deg; }
.v3 .projects-more { margin-top: 2.2rem; text-align: center; }
.v3 .projects-more .btn .icon { width: 1.05rem; height: 1.05rem; }
.v3 .project-tags li { padding: .28rem .6rem; border: 1px solid rgba(200, 232, 245, .2); border-radius: 6px; font: 400 .74rem var(--mono); color: var(--foam); }

/* Experience voyage */
.v3 .voyage { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.v3 .voyage-head { position: sticky; top: calc(var(--header-h) + 2.5rem); }
.v3 .voyage-log { position: relative; padding-left: 3rem; }
.v3 .voyage-line {
    position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px;
    background: repeating-linear-gradient(to bottom, var(--copper) 0 8px, transparent 8px 16px);
    transform-origin: top center;
}
.v3.is-motion .voyage-line { transform: scaleY(0); }
.v3 .port { position: relative; padding-bottom: 2.6rem; }
.v3 .port:last-child { padding-bottom: 0; }
.v3 .port-marker {
    position: absolute; left: calc(-3rem + 4px); top: .2rem; width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid var(--copper); background: var(--copper);
    box-shadow: 0 0 0 5px var(--paper);
    transition: background-color .35s ease, transform .35s var(--ease-out);
}
.v3.is-motion .port .port-marker { background: var(--paper); }
.v3.is-motion .port.is-passed .port-marker { background: var(--copper); transform: scale(1.12); }
.v3 .port-num { display: block; margin-bottom: .2rem; font: 400 .72rem var(--mono); color: var(--copper-ink); }
.v3 .port-year { margin-bottom: .3rem; font: 400 .82rem var(--mono); color: var(--muted); }
.v3 .port h3 { font-size: 1.5rem; line-height: 1.2; color: var(--ocean); margin-bottom: .45rem; }
.v3 .port p { max-width: 58ch; line-height: 1.7; color: var(--muted); }

/* Director */
.v3 .director { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.v3 .director-logo {
    display: block; padding: clamp(1.6rem, 4vw, 2.6rem);
    border: 1px solid var(--line-light); border-radius: var(--radius);
    background: #fff;
    transition: transform .3s var(--ease-out), box-shadow .3s ease;
}
.v3 .director-logo:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px rgba(14, 58, 90, .45); }
.v3 .director-logo img { width: 100%; height: auto; }
.v3 .director-copy p { max-width: 58ch; margin-bottom: 1rem; line-height: 1.75; color: var(--muted); }
.v3 .text-link {
    display: inline-flex; align-items: center; gap: .4rem; margin-top: .4rem; padding-bottom: .15rem;
    font-weight: 700; color: var(--ocean); text-decoration: none; border-bottom: 1.5px solid var(--copper);
}
.v3 .text-link:hover { color: var(--wave); }
.v3 .icon-inline { width: 1em; height: 1em; }

/* Stack: signal flags */
.v3 .flags { display: flex; flex-wrap: wrap; gap: .7rem; }
.v3 .flag {
    --flag: var(--wave);
    display: inline-flex; align-items: center; gap: .65rem;
    padding: .7rem 1.15rem .7rem .85rem;
    border: 1px solid rgba(200, 232, 245, .18); border-radius: 4px 999px 999px 4px;
    background: rgba(255, 255, 255, .03);
    font: 400 .86rem/1.2 var(--mono); color: var(--paper);
    transition: border-color .25s ease, background-color .25s ease;
}
.v3 .flag:hover { border-color: var(--flag); background: rgba(255, 255, 255, .06); }
.v3 .flag-2 { --flag: var(--copper); }
.v3 .flag-3 { --flag: var(--rust); }
.v3 .flag-4 { --flag: var(--foam); }
.v3 .pennant { position: relative; width: 20px; height: 16px; flex: none; }
.v3 .pennant::before { content: ''; position: absolute; left: 0; top: -2px; bottom: -2px; width: 2px; border-radius: 1px; background: rgba(244, 240, 232, .55); }
.v3 .pennant::after { content: ''; position: absolute; left: 2px; top: 0; width: 17px; height: 11px; background: var(--flag); clip-path: polygon(0 0, 100% 50%, 0 100%); }

/* Contact */
.v3 .contact { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.v3 .contact-sub { margin-bottom: 1rem; font: italic 400 clamp(1.4rem, 2.6vw, 1.8rem)/1.2 var(--serif); color: var(--copper); }
.v3 .contact-head > p:not(.kicker):not(.contact-sub) { max-width: 48ch; margin-bottom: 2rem; line-height: 1.75; color: rgba(244, 240, 232, .75); }
.v3 .contact-card { padding: clamp(1.5rem, 4vw, 2.4rem); border: 1px solid var(--line-dark); border-radius: var(--radius); background: rgba(11, 15, 20, .35); }
.v3 .contact-list li { display: flex; align-items: center; gap: .9rem; padding-block: 1rem; border-bottom: 1px solid rgba(200, 232, 245, .1); overflow-wrap: anywhere; }
.v3 .contact-list .icon { color: var(--foam); }
.v3 .contact-list a { color: var(--paper); text-underline-offset: 3px; text-decoration-color: rgba(200, 232, 245, .4); }
.v3 .contact-list a:hover { text-decoration-color: var(--copper); }
.v3 .contact-list em { font-size: .85em; opacity: .7; }
.v3 .social { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }
.v3 .social-btn {
    display: inline-flex; align-items: center; gap: .5rem; padding: .62rem 1.05rem;
    border: 1px solid rgba(200, 232, 245, .25); border-radius: 999px;
    font-size: .86rem; font-weight: 600; color: var(--paper); text-decoration: none;
    transition: background-color .2s ease, border-color .2s ease;
}
.v3 .social-btn:hover { background: rgba(255, 255, 255, .08); border-color: var(--foam); }
.v3 .social-btn .icon { width: 1.1rem; height: 1.1rem; }

/* Footer */
.v3 .footer {
    background: var(--ink); color: rgba(244, 240, 232, .62);
    padding-top: 2.4rem; padding-bottom: calc(2.4rem + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(200, 232, 245, .08);
    font-size: .86rem;
}
.v3 .footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.v3 .footer a:not(.logo) { color: var(--foam); text-underline-offset: 3px; }
.v3 .footer-copy { font: 400 .76rem var(--mono); }
.v3 .footer .boat-logo path { stroke: var(--ink); }

/* Responsive */
@media (max-width: 999.98px) {
    .v3 .about-grid,
.v3 .voyage,
.v3 .director,
.v3 .contact { grid-template-columns: minmax(0, 1fr); }
    .v3 .voyage-head { position: static; }
    .v3 .director-logo { max-width: 420px; }
}

@media (max-width: 899.98px) {
    .v3 .person { grid-template-columns: minmax(0, 1fr); }
    .v3 .person-photo { grid-column: 1; grid-row: 1; width: min(100% - .75rem, 440px); margin-left: .75rem; }
    .v3 .person-photo::before { inset: .9rem .9rem -.9rem -.75rem; }
    .v3 .person-panel { grid-column: 1; grid-row: 2; margin-top: -3.5rem; margin-left: 1rem; }
    .v3 .legend,
.v3 .projects { grid-template-columns: minmax(0, 1fr); }
    .v3 .legend-item,
.v3 .legend-item:nth-child(even) { padding-left: 0; padding-right: 0; }
    .v3 .legend-item:nth-child(odd) { border-right: 0; }
}

@media (max-width: 560px) {
    .v3 .traits { grid-template-columns: minmax(0, 1fr); }
    .v3 .btn { padding: .85rem 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
    .v3 .project,
.v3 .project-link,
.v3 .director-logo,
.v3 .btn { transition: none; }
}
