/* ================================================
   Robert Oosterloo — Personal Website
   style.css
   ================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    --dark:           #0b0b0b;
    --dark-2:         #141414;
    --dark-3:         #1c1c1c;
    --dark-border:    rgba(255, 255, 255, 0.07);
    --dark-border-2:  rgba(255, 255, 255, 0.12);

    --light:          #f5f4f0;
    --light-2:        #eeedea;
    --light-3:        #e6e5e1;
    --light-border:   rgba(0, 0, 0, 0.08);

    --text-dark:      #1a1a1a;
    --text-light:     #e8e7e3;
    --muted-dark:     #666663;
    --muted-light:    #888884;

    --accent:         #FF6535;
    --accent-hover:   #e8551e;

    --font-heading:   'Jost', sans-serif;
    --font-body:      'Inter', sans-serif;

    --max-w:          1280px;
    --nav-h:          72px;
    --r:              4px;
    --ease:           cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --t:              0.35s var(--ease);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--light);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    cursor: none;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ---------- Custom Cursor ---------- */
.cursor {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s var(--ease), width 0.25s var(--ease), height 0.25s var(--ease), opacity 0.25s var(--ease);
    mix-blend-mode: normal;
    opacity: 0.85;
}

.cursor.hovering {
    width: 40px;
    height: 40px;
}

/* On touch devices, hide cursor */
@media (hover: none) {
    .cursor { display: none; }
    body { cursor: auto; }
}

/* ---------- Container ---------- */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 48px;
}

/* ---------- Section Shared ---------- */
.section {
    padding: 120px 0;
}

.section--dark {
    background-color: var(--dark);
}

.section__header {
    margin-bottom: 72px;
}

.section__label {
    display: block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted-dark);
    margin-bottom: 16px;
}

.section__label--light {
    color: var(--muted-light);
}

.section__title {
    font-family: var(--font-heading);
    font-size: clamp(36px, 5vw, 72px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: var(--text-dark);
}

.section__title em {
    font-style: italic;
    font-weight: 700;
}

.section__title--light {
    color: var(--text-light);
}

/* ---------- Reveal Animation ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: var(--r);
    transition: background-color var(--t), transform var(--t), color var(--t), border-color var(--t);
    cursor: none;
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn--primary {
    background-color: var(--accent);
    color: var(--dark);
    border-color: var(--accent);
}
.btn--primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn--outline {
    background: transparent;
    color: rgba(255,255,255,0.7);
    border-color: var(--dark-border-2);
}
.btn--outline:hover {
    color: #ffffff;
    border-color: rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.04);
}

.btn--dark {
    background-color: var(--dark);
    color: var(--text-light);
    border-color: var(--dark);
}
.btn--dark:hover {
    background-color: var(--dark-3);
    transform: translateY(-2px);
}

.btn--accent {
    background-color: var(--accent);
    color: var(--dark);
    border-color: var(--accent);
}
.btn--accent:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
}

/* ============================
   NAVIGATION
   ============================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-h);
    border-bottom: 1px solid transparent;
    transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease), backdrop-filter 0.5s var(--ease);
}

.nav.scrolled {
    background-color: rgba(11, 11, 11, 0.88);
    border-bottom-color: var(--dark-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.nav__inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 48px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__brand {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav__link {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55);
    transition: color var(--t);
}
.nav__link:hover { color: #fff; }
.nav__link--cta { color: var(--accent); font-weight: 500; }
.nav__link--cta:hover { color: var(--accent-hover); }
.nav__link.active { color: #fff; }

.nav__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: none;
    padding: 4px;
    z-index: 1001;
}
.nav__burger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: #fff;
    transition: all var(--t);
    transform-origin: center;
}
.nav__burger.open span:nth-child(1) {
    transform: translateY(3.25px) rotate(45deg);
}
.nav__burger.open span:nth-child(2) {
    transform: translateY(-3.25px) rotate(-45deg);
}

/* ============================
   MOBILE MENU
   ============================ */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--dark);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease);
}
.mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}
.mobile-menu ul { text-align: center; }
.mobile-menu li { overflow: hidden; }
.mobile-menu__link {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(36px, 8vw, 56px);
    font-weight: 800;
    color: var(--text-light);
    padding: 12px 0;
    transition: color var(--t);
    letter-spacing: -0.03em;
}
.mobile-menu__link:hover { color: var(--accent); }

/* ============================
   HERO
   ============================ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 640px;
    background-color: var(--dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Subtle grid background */
.hero__grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
}

/* Radial vignette */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(11,11,11,0.85) 100%);
    pointer-events: none;
}

.hero__content {
    text-align: center;
    padding: 0 24px;
    z-index: 2;
    position: relative;
}

/* Hero entrance animations */
.hero__anim-1 { animation: heroFadeUp 0.9s var(--ease) 0.1s both; }
.hero__anim-2 { animation: heroFadeUp 0.9s var(--ease) 0.25s both; }
.hero__anim-3 { animation: heroFadeUp 0.9s var(--ease) 0.4s both; }
.hero__anim-4 { animation: heroFadeUp 0.9s var(--ease) 0.55s both; }

@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin-bottom: 36px;
    padding: 8px 18px;
    border: 1px solid var(--dark-border);
    border-radius: 100px;
}

.hero__badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #4ade80;
    flex-shrink: 0;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
    50%       { opacity: 0.6; box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(48px, 13vw, 72px);
    font-weight: 800;
    line-height: 0.92;
    letter-spacing: -0.04em;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.hero__title-line       { color: var(--text-light); }
.hero__title-line--accent { color: var(--accent); }

.hero__subtitle {
    font-size: 16px;
    font-weight: 400;
    color: rgba(255,255,255,0.45);
    margin-bottom: 48px;
    line-height: 2;
}

.hero__location {
    font-size: 12px;
    letter-spacing: 0.06em;
    display: block;
    margin-top: -4px;
}

.hero__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Scroll indicator */
.hero__scroll-indicator {
    position: absolute;
    bottom: 80px;
    left: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 2;
}

.hero__scroll-text {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.25);
    writing-mode: vertical-rl;
}

.hero__scroll-line {
    width: 1px;
    height: 56px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.25), transparent);
    animation: scrollDown 2.2s ease-in-out infinite;
    transform-origin: top;
}

@keyframes scrollDown {
    0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
    20%  { opacity: 1; }
    50%  { transform: scaleY(1); transform-origin: top; }
    50.1%{ transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* Ticker */
.hero__ticker-wrap {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    overflow: hidden;
    border-top: 1px solid var(--dark-border);
    padding: 14px 0;
    z-index: 2;
    background: rgba(0,0,0,0.3);
}

.hero__ticker {
    display: flex;
    align-items: center;
    gap: 36px;
    white-space: nowrap;
    animation: ticker 24s linear infinite;
}

.hero__ticker span {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.hero__ticker .ticker-dot {
    color: var(--accent);
    opacity: 0.6;
}

@keyframes ticker {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ============================
   ABOUT
   ============================ */
.about {
    background-color: var(--light);
}

.about__layout {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 96px;
    align-items: start;
}

.about__heading .section__title {
    position: sticky;
    top: calc(var(--nav-h) + 40px);
}

.about__body p {
    font-size: 16px;
    line-height: 1.85;
    color: var(--muted-dark);
    margin-bottom: 20px;
}

.about__body a {
    color: var(--text-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.about__skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 32px 0;
}

.tag {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 6px 14px;
    border: 1px solid var(--light-border);
    border-radius: 100px;
    color: var(--muted-dark);
    background: var(--light-2);
    transition: background-color var(--t), border-color var(--t);
}
.tag:hover {
    background: var(--light-3);
    border-color: rgba(0,0,0,0.15);
}

.about__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--light-border);
}

.stat {
    padding: 0 24px 0 0;
}
.stat + .stat {
    padding-left: 24px;
    border-left: 1px solid var(--light-border);
}

.stat__number {
    font-family: var(--font-heading);
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 6px;
}

.stat__desc {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--muted-dark);
    text-transform: uppercase;
}

/* ============================
   SERVICES
   ============================ */
.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background-color: var(--dark-border);
    border: 1px solid var(--dark-border);
    border-radius: calc(var(--r) * 2);
    overflow: hidden;
}

.service-card {
    background-color: var(--dark-2);
    padding: 44px 40px;
    transition: background-color var(--t);
}
.service-card:hover {
    background-color: var(--dark-3);
}

.service-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
}

.service-card__num {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.18);
}

.service-card__icon {
    color: var(--accent);
    opacity: 0.85;
    transition: opacity var(--t);
}
.service-card:hover .service-card__icon {
    opacity: 1;
}

.service-card__title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.service-card__text {
    font-size: 14px;
    line-height: 1.75;
    color: var(--muted-light);
}

/* ============================
   WORK
   ============================ */
.work {
    background-color: var(--light);
}

.work__list {
    border-top: 1px solid var(--light-border);
}

.project-item {
    display: grid;
    grid-template-columns: 56px 1fr 180px 40px;
    align-items: center;
    gap: 24px;
    padding: 28px 0;
    border-bottom: 1px solid var(--light-border);
    transition: padding var(--t), background-color var(--t), margin var(--t);
    cursor: none;
}

.project-item:hover {
    background-color: var(--light-2);
    padding-left: 20px;
    padding-right: 20px;
    margin-left: -20px;
    margin-right: -20px;
}

.project-item__index {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    color: var(--muted-dark);
    letter-spacing: 0.08em;
    opacity: 0.5;
}

.project-item__title {
    font-family: var(--font-heading);
    font-size: clamp(20px, 2.8vw, 36px);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text-dark);
    margin-bottom: 4px;
    line-height: 1.1;
}

.project-item__desc {
    font-size: 13px;
    color: var(--muted-dark);
    line-height: 1.55;
}

.project-item__type {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-dark);
    text-align: right;
}

.project-item__arrow {
    font-size: 18px;
    color: var(--muted-dark);
    transition: transform var(--t), color var(--t);
    text-align: right;
}
.project-item:hover .project-item__arrow {
    transform: translateX(5px);
    color: var(--text-dark);
}

.work__footer {
    margin-top: 56px;
    text-align: center;
}

/* ============================
   CONTACT
   ============================ */
.contact {
    background-color: var(--dark);
}

.contact__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact__sub {
    margin-top: 24px;
    font-size: 16px;
    color: var(--muted-light);
    line-height: 1.75;
}

.contact__details {
    padding-top: 8px;
}

.contact__item {
    padding: 24px 0;
    border-bottom: 1px solid var(--dark-border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact__label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted-light);
}

.contact__value {
    font-size: 18px;
    font-weight: 400;
    color: var(--text-light);
    transition: color var(--t);
}

a.contact__value:hover {
    color: var(--accent);
}

.contact__cta {
    margin-top: 36px;
    width: 100%;
    justify-content: center;
    font-size: 15px;
}

/* ============================
   FOOTER
   ============================ */
.footer {
    background-color: var(--dark);
    border-top: 1px solid var(--dark-border);
    padding: 32px 0;
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer__copy {
    font-size: 13px;
    color: rgba(255,255,255,0.2);
}

.footer__nav {
    display: flex;
    gap: 32px;
}
.footer__nav a {
    font-size: 13px;
    color: rgba(255,255,255,0.3);
    transition: color var(--t);
}
.footer__nav a:hover { color: rgba(255,255,255,0.7); }

.footer__brand {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
    transition: color var(--t);
}
.footer__brand:hover { color: var(--accent); }

/* ============================
   RESPONSIVE
   ============================ */

@media (max-width: 1100px) {
    .container { padding: 0 40px; }
    .nav__inner { padding: 0 40px; }

    .about__layout { grid-template-columns: 1fr; gap: 56px; }
    .about__heading .section__title { position: static; }

    .services__grid { grid-template-columns: repeat(2, 1fr); }

    .contact__layout { grid-template-columns: 1fr; gap: 56px; }

    .project-item { grid-template-columns: 44px 1fr 140px 32px; }
}

@media (max-width: 768px) {
    .container { padding: 0 24px; }
    .nav__inner { padding: 0 24px; }

    .nav__menu { display: none; }
    .nav__burger { display: flex; }

    .section { padding: 80px 0; }
    .section__header { margin-bottom: 48px; }

    .hero__scroll-indicator { display: none; }

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

    .about__stats { grid-template-columns: repeat(3, 1fr); }
    .stat { padding: 0 12px 0 0; }
    .stat + .stat { padding-left: 12px; }
    .stat__number { font-size: 32px; }

    .project-item {
        grid-template-columns: 36px 1fr 32px;
        gap: 16px;
    }
    .project-item__type { display: none; }

    .footer__nav { display: none; }
}

@media (max-width: 480px) {
    .container { padding: 0 20px; }
    .nav__inner { padding: 0 20px; }

    .hero__title { gap: 4px; }
    .hero__actions { flex-direction: column; align-items: stretch; }
    .hero__actions .btn { justify-content: center; }

    .about__stats { grid-template-columns: 1fr; gap: 24px; }
    .stat { padding: 0; border: none !important; }
    .stat + .stat { border-top: 1px solid var(--light-border) !important; padding-top: 24px; padding-left: 0; }

    .project-item { grid-template-columns: 1fr 32px; }
    .project-item__index { display: none; }

    .service-card { padding: 32px 24px; }

    .footer__inner { flex-direction: column; align-items: flex-start; }
}
