/*
    Explicitly forces any element with the hidden attribute to disappear.
    Helps with filtering and with the toggleable LinkedIn posts.
*/
[hidden] {
    display: none !important;
}

/* --- VARIABLES --- */

/*
   Fixed brand values. These never change between light and dark sections.
*/
:root {
    --ink: #08080a;
    --text: #f5f5f5;

    --accent: #e6273c;
    --accent-hi: #ff4054;

    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    --max: 1180px;
    --nav-h: 57px;

    color-scheme: dark;
}


/*
   WHITE AND BLACK THEMES

   A section sets them once with .bg-black or
   .bg-white, and everything inside it re-colours automatically.

   This is what makes it safe to swap
        class="section bg-white"
   for
        class="section bg-black"
   without touching any other CSS.

   --bg            section background
   --fg            primary text
   --fg-muted      secondary text
   --card-bg       cards, panels, form controls
   --card-bg-2     nested/recessed areas (project banners)
   --border        normal borders
   --border-strong borders that need more contrast
*/
:root,
.bg-black {
    --bg: #08080a;
    --fg: #f5f5f5;
    --fg-muted: #9999a1;
    --card-bg: #101014;
    --card-bg-2: #17171d;
    --border: #29292f;
    --border-strong: #3a3a42;
    --accent-text: #ff4054;
}

.bg-white {
    --bg: #f4f4f1;
    --fg: #101014;
    --fg-muted: #5f5f66;
    --card-bg: #ffffff;
    --card-bg-2: #ebebe6;
    --border: #dcdcd6;
    --border-strong: #bdbdb5;
    --accent-text: #b01226;
}

.bg-black,
.bg-white {
    background: var(--bg);
    color: var(--fg);
}

/*
    LIGHT MODE (set by theme.js via <html data-theme="light">)
    Reverses everything: the page chrome flips, and the two section
    palettes swap, so .bg-black sections turn light and .bg-white
    sections turn dark.
*/
:root[data-theme="light"] {
    color-scheme: light;

    --ink: #f4f4f1;
    --text: #101014;

    --bg: #f4f4f1;
    --fg: #101014;
    --fg-muted: #5f5f66;
    --card-bg: #ffffff;
    --card-bg-2: #ebebe6;
    --border: #dcdcd6;
    --border-strong: #bdbdb5;
    --accent-text: #b01226;
}

:root[data-theme="light"] .bg-black {
    --bg: #f4f4f1;
    --fg: #101014;
    --fg-muted: #5f5f66;
    --card-bg: #ffffff;
    --card-bg-2: #ebebe6;
    --border: #dcdcd6;
    --border-strong: #bdbdb5;
    --accent-text: #b01226;
}

:root[data-theme="light"] .bg-white {
    --bg: #08080a;
    --fg: #f5f5f5;
    --fg-muted: #9999a1;
    --card-bg: #101014;
    --card-bg-2: #17171d;
    --border: #29292f;
    --border-strong: #3a3a42;
    --accent-text: #ff4054;
}

/*
    Added by theme.js for ~0.5s while the theme changes, then removed,
    so normal hover effects stay snappy the rest of the time.
*/
:root.theme-transition,
:root.theme-transition *,
:root.theme-transition *::before,
:root.theme-transition *::after {
    transition:
        background-color 0.45s ease,
        color 0.45s ease,
        border-color 0.45s ease,
        fill 0.45s ease,
        stroke 0.45s ease,
        filter 0.45s ease !important;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }


/* --- BASE --- */

* {
    /* Tells the browser to include an element's padding and borders inside its specified width and height*/
    box-sizing: border-box;

}

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

body {
    margin: 0;
    background: var(--ink);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

/* Mono font option */
/* h1,
h2,
h3,
.mono {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
} */

h1,h2,h3,p {
    margin: 0;
    
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

/* Highlights buttons and links for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

::selection {
    background: var(--accent);
    color: #fff;
}

.wrap {
    width: 100%;
    max-width: var(--max);

    /* When the viewport is wider than max-width the leftover space is
       split evenly, which centres the container */
    margin: 0 auto;

    padding-left: 24px;
    padding-right: 24px;
}

/* --- NAVIGATION --- */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-h);

    border-bottom: 1px solid var(--border);
    background: var(--ink);
}

.nav-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--text);
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* The small red rectangle between EGE and CETIN */
.logo-mark {
    width: 10px;
    height: 10px;
    background: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;

    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-links a {
    display: flex;
    align-items: center;

    color: var(--fg-muted);
    font-size: 14px;

    transition: color 0.2s ease;
}

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

/* Social icons sit in the same list as the Contact link */
.nav-social svg {
    width: 18px;
    height: 18px;
}

/* Logo animation when scrolling */
.nav-inner {
    position: relative; /* anchor for the centred logo */
}

.nav-logo {
    position: absolute;
    inset: 0;

    /* centres without a transform */
    margin: auto; 
    width: fit-content;
    height: 40px;

    display: flex;
    align-items: center;
    opacity: 0;
}

.nav-logo img {
    height: 100%;
    width: auto;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: none;
    color: var(--fg-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.theme-toggle:hover {
    color: var(--accent);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

/* Show the icon for the mode you'd switch TO */
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun  { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }


/* --- BREADCRUMBS --- */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;

    margin-bottom: 48px;

    color: var(--fg-muted);
    font-family: var(--font-mono);
    font-size: 12px;
}

.breadcrumbs a {
    color: var(--fg-muted);
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: var(--accent-text, var(--accent));
}

.breadcrumb-separator {
    color: var(--border-strong);
}

.breadcrumb-current {
    color: var(--fg);
}

/* --- HERO --- */


/* Screen 1: logo only, exactly one screen tall (minus the navbar) */
.hero-splash {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: calc(100svh - var(--nav-h));
    padding: 24px 0;
    
    
    /* Tracks how far this block has scrolled out of view */
    view-timeline-name: --splash;
    view-timeline-axis: block;
}

/* Three columns: links | logo + hint | links */
.splash-stage {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 40px;
}

.splash-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    margin-bottom: 50px;
}

.splash-side {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.splash-left  { justify-self: end;   align-items: flex-start; }
.splash-right { justify-self: start; align-items: flex-start; }

.splash-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 6px 2px 6px 20px;      /* left padding makes room for the dot */

    color: var(--fg-muted);
    font-family: var(--font-mono);
    font-size: 20px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;

    /* The dot, drawn as a background so ::before and ::after stay free for the effect */
    background: linear-gradient(var(--accent), var(--accent))
                no-repeat left center / 6px 6px;

    animation: float 5s ease-in-out infinite;
    transition: color 0.2s ease;
}

/* Bar that flashes, then the final underline */
.splash-link::before,
.splash-link::after {
    content: "";
    position: absolute;
    left: 20px;                       /* starts after the dot */
    width: calc(100% - 22px);         /* covers the text only */
    top: calc(100% - 4px);
    background: var(--accent);
    opacity: 0;
    pointer-events: none;
}

.splash-link::before {
    height: 10px;
}

.splash-link::after {
    height: 1px;
    transition: opacity 0.3s;
    transition-delay: 0s;
}


/* Keep the gentle bob, but out of sync so they don't move as a block */
.splash-link:nth-child(even) {
    animation-delay: -2.5s;
}

.splash-left  .splash-link:nth-child(odd)  { --x: -28px; }
.splash-left  .splash-link:nth-child(even) { --x: 12px; animation-delay: -2s; }
.splash-right .splash-link:nth-child(odd)  { --x: 28px;  animation-delay: -1s; }
.splash-right .splash-link:nth-child(even) { --x: -12px; animation-delay: -3.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-7px); }
}

@keyframes lineUp {
    0% {
        transform-origin: 50% 100%;
        transform: scale3d(1, 0.045, 1);
    }
    50% {
        transform-origin: 50% 100%;
        transform: scale3d(1, 1, 1);
    }
    51% {
        transform-origin: 50% 0%;
        transform: scale3d(1, 1, 1);
    }
    100% {
        transform-origin: 50% 0%;
        transform: scale3d(1, 0.045, 1);
    }
}

/* "Scroll for more" under the logo */
.scroll-hint {
    position:absolute;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;

    color: var(--fg-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;

    transition: color 0.2s ease;
}



.scroll-arrow {
    font-size: 16px;
    animation: nudge 1.8s ease-in-out infinite;
}

@keyframes nudge {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(5px); }
}

.hero-logo {
    width: min(70vw, 560px);    
    height: auto;

    /*
        Reserve room for "Scroll for more" hint (~60px), the gap above it, and padding.
        The logo shrinks to fit, so the hint always has space below it.
    */
    max-height: calc(100svh - var(--nav-h) - 180px);

    /* If the height cap kicks in, scale the artwork inside the box without stretching it */
    object-fit: contain;
}

/* Screen 2: the original hero */
.hero-main {
    scroll-margin-top: var(--nav-h);
    display: flex;
    align-items: center;
    min-height: calc(100svh - var(--nav-h));
    padding: 80px 0;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 80px;
    align-items: center;
}

/* Scroll animation (browsers without support just show everything normally) */
@supports (animation-timeline: view()) {

    /* Logo drifts up faster than the page and fades out in the first ~40% of scroll */
    .hero-logo {
        animation: logo-exit linear both;
        animation-timeline: --splash;
        animation-range: exit 0% exit 40%;
    }

    /* Profile rises into place as it enters the screen */
    .hero-layout {
        animation: hero-enter linear both;
        animation-timeline: view();
        animation-range: entry 10% entry 70%;
    }

    .hero-logo,
    .splash-side,
    .scroll-hint {
        animation: logo-exit linear both;
        animation-timeline: --splash;
        animation-range: exit 0% exit 40%;
    }
}

@keyframes logo-exit {
    to {
        opacity: 0;
        transform: translateY(-22vh) scale(0.92);
    }
}

@keyframes hero-enter {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/*
    The nav is outside .hero-splash, so the --splash timeline has to be
    hoisted to a shared ancestor for the nav logo to see it.
*/
body {
    timeline-scope: --splash;
}

@supports (animation-timeline: view()) {

    .nav-logo {
        animation: nav-logo-in linear both;
        animation-timeline: --splash;

        /* Starts fading in as the big logo is halfway through fading out */
        animation-range: exit 20% exit 60%;
    }
}

@keyframes nav-logo-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.hero-content {
    max-width: 700px;
}


.availability {
    display: inline-block;
    margin-bottom: 24px;
    padding: 6px 12px;

    background: var(--accent);
    color: #fff;

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.hero h1 {
    /* On a large monitor it can approach 88px, while on a smaller screen it won't become smaller than 48px.*/
    font-size: clamp(48px, 7vw, 88px);
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.hero-degree {
    margin-top: 24px;
    color: var(--fg-muted);
    font-size: 18px;
}

.hero-description {
    max-width: 600px;
    margin-top: 20px;
    color: var(--fg-muted);
    font-size: 16px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

/* --- PROFILE CARD --- */

.hero-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.profile-card {
    width: min(300px, 100%);
    height: 380px;

    /* Gives the child a 3D space to rotate inside of */
    perspective: 1200px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.profile-card-inner {
    position: relative;
    width: 100%;
    height: 100%;

    /* Keeps the two faces positioned in 3D rather than flattened */
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

.profile-card.is-flipped .profile-card-inner {
    transform: rotateY(180deg);
}




.profile-front,
.profile-back {
    position: absolute;
    inset: 0;

    border: 2px solid var(--border-strong);
    border-radius: 10px;
    overflow: hidden;
    background: var(--card-bg);

    /* Hides whichever face is currently pointing away from us */
    backface-visibility: hidden;
}

.profile-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-back {
    /* Starts pre-rotated so it reads correctly once the card flips */
    transform: rotateY(180deg);

    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px;
}

.profile-facts {
    margin: 0;
    padding: 0;
    list-style: none;
}

.profile-facts li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--fg-muted);
}

.profile-facts li:first-child {
    border-top: 1px solid var(--border);
}

.profile-facts .fact-label {
    display: block;
    margin-bottom: 2px;

    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
}

.profile-hint {
    color: var(--fg-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
}

.hint-tap { display: none; }

/* Touch devices can't hover, so show the tap wording instead */
@media (hover: none) {
    .hint-hover { display: none; }
    .hint-tap   { display: inline; }
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    border: 1px solid var(--border-strong);
    color: var(--fg);

    transition: color 0.2s ease, border-color 0.2s ease;
}

.social-links a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.social-links svg {
    width: 18px;
    height: 18px;
}

/* --- BUTTONS --- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid transparent;
    font-size: 14px;
    transition: 0.2s ease;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

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

.btn-outline {
    border-color: var(--border-strong);
    color: var(--fg);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* --- SECTIONS --- */

.section {
    padding: 120px 0;
}

.sect-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 40px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.sect-title-row h2 {
    font-size: 32px;
    line-height: 1;
    letter-spacing: -0.03em;
}

/* Sits on the right of the heading row (e.g. the project count) */
.sect-meta {
    color: var(--accent-text, var(--accent));
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

/* --- PROJECT FILTERS --- */

.project-filters {
    margin-bottom: 32px;
}

.filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 10px 16px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--fg);

    font: inherit;
    font-size: 13px;
    cursor: pointer;

    transition: border-color 0.2s ease, color 0.2s ease;
}

.filter-toggle:hover,
.filter-toggle[aria-expanded="true"] {
    border-color: var(--accent);
    color: var(--accent);
}

/* Three bars of decreasing width, like a filter funnel on its side */
.filter-icon {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 16px;
}

.filter-icon span {
    height: 2px;
    background: currentColor;
}

.filter-icon span:nth-child(1) { width: 16px; }
.filter-icon span:nth-child(2) { width: 11px; }
.filter-icon span:nth-child(3) { width: 6px; }

.filter-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;

    margin-top: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    background: var(--card-bg);
}

.filter-field label {
    display: block;
    margin-bottom: 8px;

    color: var(--fg-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
}

.filter-field select {
    width: 100%;
    padding: 10px 34px 10px 12px;

    border: 1px solid var(--border);
    background-color: var(--bg);
    color: var(--fg);

    font: inherit;
    font-size: 13px;
    cursor: pointer;

    /* Removes the OS dropdown arrow so the same chevron shows on both themes */
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%239999a1' stroke-width='1.6' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 11px;
}

.filter-field select:hover {
    border-color: var(--border-strong);
}

/* Spans both columns so the reset link sits on its own row */
.filter-panel-footer {
    grid-column: 1 / -1;
}

.filter-reset {
    padding: 0;
    border: none;
    background: none;
    color: var(--fg-muted);

    font: inherit;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

.filter-reset:hover {
    color: var(--accent);
}

.no-results {
    padding: 40px 0;
    color: var(--fg-muted);
    font-size: 14px;
}

/* --- PROJECTS --- */

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project-card {
    display: flex;
    flex-direction: column;

    background: var(--card-bg);
    border: 1px solid var(--border);
    overflow: hidden;

    transition: transform 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
}

/* Clip the image to the banner so the hover zoom doesn't spill out */
.project-visual {
    overflow: hidden;
}

/*
    The banner is a link, so clicking it opens the same detail page as
    the "Case study" button underneath.
*/
.project-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 220px;
    background: var(--card-bg-2);
    border-bottom: 1px solid var(--border);
}

/* Fills the banner and crops to fit without stretching */
.project-visual img {
    position: absolute;
    object-position: top;
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition: transform 0.4s ease;
}

.project-card:hover .project-visual img {
    transform: scale(1.04);
}



/*
    "Live" badge. To turn it off for a project, delete this element
    from that card's HTML.
*/
.project-live {
    position: absolute;
    top: 12px;
    right: 12px;

    display: flex;
    align-items: center;
    gap: 6px;

    padding: 4px 9px;
    background: var(--accent);
    color: #fff;

    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.project-live::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #fff;
}

.project-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 24px;
}

.project-type {
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

/* Update text to be more visible in light mode*/
.project-type,
.experience-role,
.fact-label {
    color: var(--accent-text);
}

.project-body h3 {
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Only <p> elements that are direct children of .project-body */
.project-body > p {
    margin-top: 12px;
    color: var(--fg-muted);
    font-size: 14px;
}

.project-tags {
    display: flex;

    /* Too many tags wrap onto the next line instead of overflowing */
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 20px;
}

.project-tags span {
    padding: 5px 9px;
    border: 1px solid var(--border);
    color: var(--fg-muted);
    font-size: 11px;
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;

    /* Pushes the actions to the bottom so cards line up */
    margin-top: auto;
    padding-top: 24px;
}

.project-actions a {
    color: var(--fg);
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s ease;
}

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

/* The one filled button in the row */
.project-actions .btn-live {
    padding: 8px 14px;
    background: var(--accent);
    color: #fff;
}

.project-actions .btn-live:hover {
    background: var(--accent-hi);
    color: #fff;
}


/* --- EXPERIENCE --- */
.experience-list {
    display: flex;
    flex-direction: column;
}

.experience-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 40px;
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
}

.experience-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--fg-muted);
    font-size: 11px;
    letter-spacing: 0.08em;
}

.experience-content h3 {
    font-size: 22px;
    line-height: 1.2;
}

.experience-role {
    margin-top: 6px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
}

.experience-description {
    max-width: 650px;
    margin-top: 12px;
    color: var(--fg-muted);
    font-size: 14px;
}

/*
    Optional LinkedIn post. Only the experiences that have a toggle
    button and a .linkedin-post block in their HTML get one.
*/
.post-toggle {
    margin-top: 20px;
    padding: 8px 14px;

    border: 1px solid var(--border);
    background: none;
    color: var(--fg);

    font: inherit;
    font-size: 12px;
    cursor: pointer;

    transition: border-color 0.2s ease, color 0.2s ease;
}

.post-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.linkedin-post {
    display: flex;  
    flex-direction: column;
    gap: 32px;

    margin-top: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    background: var(--card-bg);
}

/* LinkedIn's embed is a fixed-size iframe, so let it shrink on mobile */
.linkedin-post iframe {
    flex: none;
    
    display: block;
    width: 100%;
    max-width: 550px;
    border: none;
}

.linkedin-post .post-placeholder {
    color: var(--fg-muted);
    font-size: 13px;
}

/* --- FOOTER --- */

.site-footer {
    padding: 60px 0 36px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    gap: 40px;

    padding-bottom: 48px;
    border-bottom: 1px solid var(--border);
}

.footer-label {
    margin-bottom: 10px;

    color: var(--fg-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.footer-content h2 {
    color: var(--fg);

    font-family: 'JetBrains Mono', monospace;
    font-size: 42px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.footer-description {
    max-width: 460px;
    margin-top: 16px;
    color: var(--fg-muted);
    font-size: 15px;
}

.footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-top: 24px;
}

.footer-socials {
    display: flex;
    gap: 14px;
}

.footer-socials a {
    color: var(--fg-muted);
    transition: color 0.2s ease;
}

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

.footer-socials svg {
    width: 20px;
    height: 20px;
}

.footer-meta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-meta p {
    color: var(--fg-muted);
    font-family: var(--font-mono);
    font-size: 11px;
}



/* --- MEDIA QUERIES --- */

/* 
    Mobile layout. 
    When the screen width is less than 860px, 
    - the hero layout switches to a single-column layout, with the profile image on top and the text content below. 
    - the project grid switches to a single-column layout, with each project card taking up the full width of the container.

*/

/*  
    Short desktop windows (like 1024x600) - scale the card with the screen height and make sure the icons fit on screen.
*/
@media (max-height: 760px) and (min-width: 861px) {

    /* extra space below the icons */
    .hero-main {
        padding: 32px 0 40px;   
    }

    .hero-profile {
        gap: 12px;
    }

    .profile-card {
        height: clamp(340px, calc(100svh - var(--nav-h) - 210px), 380px);
    }
}

@media (max-width: 860px) {

    .hero-main {
        min-height: auto;
        padding: 80px 0;
    }

    .hero-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero-profile {
        align-items: center;
    }

    .section {
        padding: 90px 0;
    }

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

    .project-visual {
        min-height: 180px;
    }

    .site-nav {
        height: auto;
    }

    .nav-inner {
        min-height: var(--nav-h);
        gap: 16px;
    }

    .nav-links {
        gap: 16px;
    }

    .experience-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }

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

    .splash-stage {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 8px;
    }

    .splash-center {
        order: 1;
        margin-bottom: 32px;
    }

    .splash-left  { order: 2; }
    .splash-right { order: 3; }

    /* Each side is a row of two equal columns, so both rows line up vertically */
    .splash-side {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        max-width: 320px;
        gap: 0 16px;
        justify-self: center;
        align-items: center;
    }

    .splash-link {
        justify-self: start;
    }

}


/* Phones */

/* Hover only on devices that can hover, so it doesn't stick after a tap */
@media (hover: hover) {
    .splash-link:hover,
    .scroll-hint:hover {
        color: var(--accent);
    }

    .splash-link:hover::before {
        opacity: 1;
        animation: lineUp 0.3s ease forwards;
    }

    .splash-link:hover::after {
        opacity: 1;
        transition-delay: 0.3s;
    }

    /* Hover-flip only on devices that really hover (mouse) */
    .profile-card:hover .profile-card-inner {
        transform: rotateY(180deg);
    }
}

.splash-link,
.scroll-hint {
    -webkit-tap-highlight-color: transparent;
}

@media (max-height: 640px) {
    .splash-center {
        gap: 16px;
    }

    .hero-logo {
        max-height: calc(100svh - var(--nav-h) - 150px);
    }
}

@media (max-width: 600px) {

    .profile-back {
        padding: 20px;
    }

    .profile-facts li {
        padding: 10px 0;
    }

    .breadcrumbs {
        margin-bottom: 32px;
    }

    .wrap {
        padding-left: 16px;
        padding-right: 16px;
    }

    .nav-links {
        gap: 14px;
    }

    .nav-links a {
        font-size: 13px;
    }

    .hero-main {
        padding: 64px 0;
    }

    .hero h1 {
        font-size: clamp(42px, 14vw, 64px);
    }

    .hero-degree {
        font-size: 16px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .section {
        padding: 72px 0;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

    .project-body {
        padding: 20px;
    }

    .footer-content h2 {
        font-size: 34px;
    }

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

    .footer-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .nav-logo {
        display: none;
    }
}



/* --- ACCESSIBILITY --- */

/* 
    If the user has requested reduced motion, disable smooth scrolling and animations/transitions. 
*/
@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    /*
        The profile card swaps faces with a plain fade instead of
        spinning in 3D.
    */
    .profile-card:hover .profile-card-inner,
    .profile-card.is-flipped .profile-card-inner {
        transform: none;
    }

    .profile-back {
        transform: none;
        backface-visibility: visible;
        opacity: 0;
    }

    .profile-card:hover .profile-back,
    .profile-card.is-flipped .profile-back {
        opacity: 1;
    }

    .hero-logo,
    .hero-layout {
        animation: none;
    }

    .nav-logo {
        animation: none;
        opacity: 1;
    }

    .splash-link,
    .scroll-arrow {
        animation: none;
    }
}