/* =============================================================
   thedanwilson.com / Studio
   Warm paper, coral signature, Fraunces + Geist, larger type,
   embedded walkthrough videos.
   ============================================================= */

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

:root {
    --paper: #F4EFE6;
    --paper-elevated: #EFE8D8;
    --paper-deep: #E7DFCC;

    --ink: #1A1814;
    --ink-soft: #332E28;
    --ink-muted: #706B60;

    --rule: #D9D2C4;
    --rule-strong: #B9AE99;

    --coral: #D95F3A;
    --coral-hover: #B94620;
    --coral-soft: #F4B89D;
    --coral-tint: rgba(217, 95, 58, 0.12);

    --serif: 'Fraunces', 'Times New Roman', Georgia, serif;
    --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
    scroll-behavior: smooth;
    background: var(--paper);
}

body {
    font-family: var(--sans);
    font-size: 19px;
    font-weight: 400;
    line-height: 1.62;
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        /* subtle stray accent marks */
        radial-gradient(circle at 8% 18%, rgba(217, 95, 58, 0.06) 0, transparent 12%),
        radial-gradient(circle at 92% 70%, rgba(26, 24, 20, 0.05) 0, transparent 14%),
        /* paper grain */
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='280' height='280' viewBox='0 0 280 280'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.09 0 0 0 0 0.08 0 0 0 0 0.07 0 0 0 0.42 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.65'/></svg>");
    background-attachment: fixed, fixed, scroll;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

::selection {
    background: var(--coral);
    color: var(--paper);
}

.container {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
}

/* -------------------------------------------------------------
   Section labels
   ------------------------------------------------------------- */
.label,
.section-label {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: 22px;
    font-variation-settings: "opsz" 14, "SOFT" 40;
    color: var(--ink-soft);
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 18px;
    letter-spacing: 0.002em;
}

.label::before,
.section-label::before {
    content: "";
    display: inline-block;
    width: 36px;
    height: 2px;
    background: var(--coral);
    flex-shrink: 0;
}

.label::after,
.section-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--rule);
}

/* -------------------------------------------------------------
   Headings
   ------------------------------------------------------------- */
h1 {
    font-family: var(--serif);
    font-size: clamp(80px, 13vw, 168px);
    font-weight: 600;
    line-height: 0.88;
    letter-spacing: -0.035em;
    color: var(--ink);
    margin-bottom: 14px;
    font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 1;
}

h1 em, h1 .accent {
    font-style: italic;
    color: var(--coral);
    font-variation-settings: "opsz" 144, "SOFT" 80, "WONK" 1;
}

h2,
.projects h2,
.background h2,
.contact h2 {
    font-family: var(--serif);
    font-size: clamp(52px, 7vw, 88px);
    font-weight: 500;
    line-height: 0.98;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 64px;
    font-variation-settings: "opsz" 144, "SOFT" 40;
}

h2 em {
    font-style: italic;
    color: var(--coral);
    font-variation-settings: "opsz" 144, "SOFT" 90, "WONK" 1;
}

/* -------------------------------------------------------------
   Hero
   ------------------------------------------------------------- */
.hero {
    padding: 112px 0 112px;
    position: relative;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 56px;
    align-items: center;
}

.hero-text { min-width: 0; }

.hero-image {
    position: relative;
    justify-self: center;
    width: min(100%, 360px);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* signature color shape behind the photo */
.hero-image::before {
    content: "";
    position: absolute;
    width: 108%;
    height: 108%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--coral);
    border-radius: 50%;
    z-index: 0;
    filter: saturate(1.05);
}

.hero-image::after {
    /* small decorative stamp */
    content: "*";
    position: absolute;
    bottom: -24px;
    left: -18px;
    font-family: var(--serif);
    font-style: italic;
    font-size: 72px;
    color: var(--coral);
    line-height: 0.7;
    z-index: 2;
    transform: rotate(-8deg);
    font-variation-settings: "opsz" 24, "SOFT" 100;
}

.hero-image img {
    position: relative;
    z-index: 1;
    width: 92%;
    height: 92%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 25%;
    filter: saturate(0.9) contrast(1.04);
    display: block;
}

.subtitle {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(32px, 4.2vw, 48px);
    font-weight: 400;
    line-height: 1.08;
    color: var(--ink-soft);
    margin-bottom: 36px;
    font-variation-settings: "opsz" 72, "SOFT" 90, "WONK" 1;
}

.tagline {
    font-size: 19px;
    font-weight: 400;
    color: var(--ink-soft);
    line-height: 1.65;
    max-width: 48ch;
    margin-bottom: 32px;
}

.details {
    font-family: var(--sans);
    font-size: 14.5px;
    font-weight: 500;
    color: var(--ink-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 40px;
    line-height: 1.7;
}

.details-sep {
    color: var(--coral);
    font-weight: 400;
    margin: 0 10px;
    font-size: 16px;
    position: relative;
    top: 1px;
}

/* override list-dots from any leftover elements */
.details li::before,
.details li + li::before {
    content: none !important;
    display: none;
    background: none;
    width: 0;
    height: 0;
    margin: 0;
    border-radius: 0;
}

.hero-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

/* -------------------------------------------------------------
   Buttons / sans, squared, with arrow
   ------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 26px;
    border-radius: 6px;
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0;
    text-decoration: none;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn .arrow {
    font-family: var(--serif);
    font-size: 19px;
    transition: transform 0.25s ease;
    position: relative;
    top: -1px;
}

.btn:hover .arrow {
    transform: translateX(3px);
}

.btn-primary {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

.btn-primary:hover {
    background: var(--coral);
    border-color: var(--coral);
}

.btn-secondary {
    background: transparent;
    color: var(--ink);
    border-color: var(--ink);
}

.btn-secondary:hover {
    background: var(--ink);
    color: var(--paper);
}

/* -------------------------------------------------------------
   Projects
   ------------------------------------------------------------- */
.projects {
    padding: 120px 0 110px;
    border-top: 1px solid var(--rule);
    position: relative;
}

.project-card {
    display: grid;
    grid-template-columns: 172px 1fr;
    gap: 28px 40px;
    padding: 88px 0;
    border-top: 1px solid var(--rule);
    background: transparent;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    margin-bottom: 0;
    transition: none;
    align-items: start;
    position: relative;
}

.project-card:first-of-type {
    border-top: none;
    padding-top: 8px;
}

.project-card:hover {
    border-color: var(--rule);
}

.project-number {
    font-family: var(--serif);
    font-size: clamp(88px, 10vw, 132px);
    font-weight: 500;
    font-style: italic;
    color: var(--coral);
    opacity: 1;
    line-height: 0.85;
    letter-spacing: -0.035em;
    width: auto;
    flex-shrink: 0;
    padding-top: 14px;
    transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
    font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 1;
    overflow: visible;
}

.project-card:hover .project-number {
    transform: translateX(-6px);
}

.project-content {
    flex: 1;
    min-width: 0;
}

.project-content h3 {
    font-family: var(--serif);
    font-size: clamp(34px, 3.6vw, 44px);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.015em;
    margin-bottom: 14px;
    color: var(--ink);
    font-variation-settings: "opsz" 72, "SOFT" 40;
}

.project-sub {
    font-family: var(--serif);
    font-style: italic;
    font-size: 22px;
    font-weight: 400;
    color: var(--ink-soft);
    margin-bottom: 32px;
    line-height: 1.42;
    letter-spacing: 0.002em;
    max-width: 60ch;
    font-variation-settings: "opsz" 36, "SOFT" 90, "WONK" 1;
}

.project-desc {
    font-size: 18px;
    font-weight: 400;
    color: var(--ink-soft);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 62ch;
}

/* -------------------------------------------------------------
   Metrics strip
   ------------------------------------------------------------- */
.metrics {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 14px 34px;
    margin-bottom: 32px;
    padding: 20px 0;
    border-top: 2px solid var(--ink);
    border-bottom: 1px solid var(--rule);
}

.metric {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    min-width: 0;
}

.metric-value {
    display: inline;
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin: 0;
    line-height: 1.1;
    font-variation-settings: "opsz" 36, "SOFT" 30;
}

.metric-label {
    display: inline;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* -------------------------------------------------------------
   Tech tags / slash-separated inline list
   ------------------------------------------------------------- */
.tech-tags {
    display: block;
    margin-bottom: 36px;
    font-family: var(--sans);
    font-size: 14.5px;
    font-weight: 500;
    color: var(--ink-muted);
    line-height: 1.7;
    letter-spacing: 0.005em;
}

.tech-tags span {
    display: inline;
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    border-radius: 0;
}

.tech-tags span + span::before {
    content: "  /  ";
    color: var(--coral);
    font-weight: 500;
    white-space: pre;
}

/* -------------------------------------------------------------
   Embedded walkthrough video
   ------------------------------------------------------------- */
.video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 18px;
    background: var(--ink);
    border: 1px solid var(--rule-strong);
    box-shadow: 8px 8px 0 var(--coral);
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease;
    border-radius: 6px;
}

.video-embed:hover {
    transform: translate(-3px, -3px);
    box-shadow: 11px 11px 0 var(--coral);
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* -------------------------------------------------------------
   Walkthrough link (secondary to embed)
   ------------------------------------------------------------- */
.walkthrough-link {
    font-family: var(--sans);
    font-style: normal;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-muted);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
    transition: color 0.25s ease;
}

.walkthrough-link:hover {
    color: var(--coral);
}

/* -------------------------------------------------------------
   Background grid ("How I Got Here")
   ------------------------------------------------------------- */
.background {
    padding: 120px 0 120px;
    border-top: 1px solid var(--rule);
    position: relative;
}

.bg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px 80px;
}

.bg-card {
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    border-top: 2px solid var(--ink);
    padding-top: 26px;
    transition: border-color 0.25s ease;
    position: relative;
}

.bg-card:hover {
    border-top-color: var(--coral);
}

.bg-card h3 {
    font-family: var(--serif);
    font-style: italic;
    font-size: 28px;
    font-weight: 500;
    line-height: 1.18;
    margin-bottom: 18px;
    color: var(--ink);
    letter-spacing: 0.002em;
    font-variation-settings: "opsz" 36, "SOFT" 70, "WONK" 1;
}

.bg-card p {
    font-size: 17px;
    font-weight: 400;
    color: var(--ink-soft);
    line-height: 1.72;
}

/* -------------------------------------------------------------
   Contact
   ------------------------------------------------------------- */
.contact {
    padding: 140px 0 150px;
    text-align: center;
    border-top: 1px solid var(--rule);
    position: relative;
}

.contact::before {
    content: "";
    position: absolute;
    top: 68px;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    height: 72px;
    background: var(--coral);
    border-radius: 50%;
    z-index: 0;
    opacity: 0.95;
}

.contact h2 {
    position: relative;
    z-index: 1;
    margin-bottom: 28px;
}

.contact-text {
    font-size: 19px;
    font-weight: 400;
    color: var(--ink-soft);
    max-width: 560px;
    margin: 0 auto 44px;
    line-height: 1.72;
    position: relative;
    z-index: 1;
}

.contact-links {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* -------------------------------------------------------------
   Motion
   ------------------------------------------------------------- */
@keyframes rise-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes shape-pop {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.85) rotate(-6deg); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
}

.hero-text > * {
    animation: rise-in 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero-text > *:nth-child(1) { animation-delay: 0.05s; }
.hero-text > *:nth-child(2) { animation-delay: 0.12s; }
.hero-text > *:nth-child(3) { animation-delay: 0.20s; }
.hero-text > *:nth-child(4) { animation-delay: 0.28s; }
.hero-text > *:nth-child(5) { animation-delay: 0.36s; }
.hero-text > *:nth-child(6) { animation-delay: 0.44s; }

.hero-image {
    animation: fade-in 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: 0.22s;
}

.hero-image::before {
    animation: shape-pop 1.1s cubic-bezier(0.2, 0.9, 0.2, 1.2) both;
    animation-delay: 0.1s;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* -------------------------------------------------------------
   Responsive
   ------------------------------------------------------------- */
@media (max-width: 900px) {
    .container { padding: 0 28px; }

    .hero { padding: 72px 0 80px; }

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

    .hero-image {
        order: -1;
        width: min(100%, 260px);
    }

    h1 { font-size: clamp(56px, 14vw, 92px); }
    .subtitle { font-size: 30px; }

    .label,
    .section-label { font-size: 18px; margin-bottom: 24px; }

    .projects, .background {
        padding: 88px 0;
    }

    .contact {
        padding: 104px 0 112px;
    }

    .projects h2,
    .background h2,
    .contact h2 {
        font-size: clamp(40px, 9vw, 60px);
        margin-bottom: 44px;
    }

    .project-card {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 64px 0;
    }

    .project-number {
        font-size: 84px;
        padding-top: 0;
        margin-bottom: 8px;
    }

    .project-content h3 { font-size: 30px; margin-bottom: 10px; }
    .project-sub { font-size: 19px; margin-bottom: 24px; }
    .project-desc { font-size: 17px; margin-bottom: 28px; }

    .metrics {
        gap: 10px 24px;
        padding: 16px 0;
    }

    .metric-value { font-size: 19px; }
    .metric-label { font-size: 11px; }

    .tech-tags { font-size: 13.5px; }

    .video-embed {
        box-shadow: 5px 5px 0 var(--coral);
    }

    .bg-grid {
        grid-template-columns: 1fr;
        gap: 52px;
    }

    .bg-card h3 { font-size: 24px; }
    .bg-card p { font-size: 16px; }

    .contact::before { top: 56px; width: 54px; height: 54px; }
    .contact-text { font-size: 17px; }

    .btn { padding: 13px 20px; font-size: 14px; }
}
