:root {
    --bg: #ffffff;
    --bg-alt: #fafafa;
    --text-main: #0a0a0a;
    --text-muted: #525252;
    --text-faint: #a3a3a3;
    --border-color: #d2d2d7;
    --border-hover: #050505;
    --glow-color: #050505;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --gap: 40px;
    --radius: 0px;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-hover: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    height: 100%;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-alt);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    padding: 60px 40px;
    min-height: 100%;
    display: flex;
    justify-content: center;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: fixed;
    top: 20px;
    left: 20px;
    width: auto;
    height: auto;
    background: #000;
    color: #fff;
    padding: 12px 20px;
    z-index: 1000;
    font-weight: 600;
    font-size: 0.9rem;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap);
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.span-4 { grid-column: span 4; }
.span-2 { grid-column: span 2; }
.span-1 { grid-column: span 1; }
.span-all { grid-column: 1 / -1; }

.tile {
    background: var(--bg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform, box-shadow, border-color;
    transition: transform 0.4s var(--ease-hover), box-shadow 0.4s var(--ease-hover), border-color 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out-expo) forwards;
}

.tile:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    z-index: 10;
    box-shadow: 0 20px 40px -15px color-mix(in srgb, var(--glow-color), transparent 85%);
}

.tile:focus-visible {
    outline: 2px solid var(--text-main);
    outline-offset: 2px;
    z-index: 11;
}

.tile:nth-child(1) { animation-delay: 0.05s; }
.tile:nth-child(2) { animation-delay: 0.10s; }
.tile:nth-child(3) { animation-delay: 0.15s; }
.tile:nth-child(4) { animation-delay: 0.20s; }
.tile:nth-child(5) { animation-delay: 0.25s; }
.tile:nth-child(6) { animation-delay: 0.30s; }
.tile:nth-child(7) { animation-delay: 0.35s; }
.tile:nth-child(8) { animation-delay: 0.40s; }
.tile:nth-child(9) { animation-delay: 0.45s; }
.tile:nth-child(n+10) { animation-delay: 0.50s; }

.header-content {
    padding: 3.5rem;
    justify-content: space-between;
    align-items: flex-start;
}

.brand {
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    text-transform: uppercase;
}

.serif-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 0.95;
    font-weight: 500;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    font-feature-settings: "liga" 1, "kern" 1;
}

.titles {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    display: block;
    margin-top: 1rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: -0.01em;
}

.manifesto {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--text-main);
    line-height: 1.4;
    margin-top: 3.5rem;
}

.bold { font-weight: 600; color: #000; }
.italic { font-style: italic; }
.desktop-only { display: block; }

.photo-tile {
    position: relative;
    min-height: 320px;
    cursor: pointer;
}

.photo-tile img {
    width: 101%;
    height: 101%;
    margin: -1px;
    object-fit: cover;
    transition: transform 1.2s var(--ease-out-expo);
}

.photo-tile:hover img {
    transform: scale(1.03);
}

.linkedin-tile {
    padding: 3rem;
}

.li-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.li-title {
    font-family: var(--font-serif);
    font-size: 2.25rem;
    line-height: 1.1;
    font-weight: 500;
    margin: 1.5rem 0;
    letter-spacing: -0.02em;
}

.li-desc {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: auto;
}

.li-bottom {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 2.5rem;
}

.btn-link-black {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-main);
    display: inline-block;
}

.email-small {
    font-size: 0.8rem;
    color: var(--text-faint);
    font-variant-numeric: tabular-nums;
}

.project-tile {
    min-height: 500px;
}

.img-box {
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    border-right: none; 
    flex: 2;
}

.book-tile {
    display: grid;
    grid-template-columns: 35% 65%;
    grid-column-gap: 40px;
    min-height: auto;
}

.book-tile .img-box {
    border-bottom: none;
    border-right: none;
    height: 100%;
}

.img-box img {
    width: 101%;
    height: 101%;
    margin: -0.5px;
    object-fit: cover;
    transition: transform 1s var(--ease-out-expo);
}

.project-tile:hover .img-box img,
.book-tile:hover .img-box img {
    transform: scale(1.03);
}

.txt-box {
    padding: 2.5rem;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.book-tile .txt-box {
    padding: 2rem 2.5rem;
}

.meta {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-faint);
    margin-bottom: 1rem;
    font-weight: 700;
}

.title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    line-height: 1.1;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.cred-tile {
    padding: 3rem 2rem;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.cred-meta {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--text-faint);
    margin-bottom: 1.25rem;
    font-weight: 700;
}

.icon-box {
    margin-bottom: 1.25rem;
    color: var(--text-main);
}

.cred-title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.cred-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.quote-tile {
    padding: 3.5rem 3rem;
    justify-content: center;
    background-color: #fcfcfc;
}

.quote-text {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.35rem;
    margin-bottom: 2rem;
    line-height: 1.4;
    color: var(--text-main);
}

.quote-tile cite {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    color: var(--text-muted);
    display: block;
    font-style: normal;
}

.quote-tile cite a {
    border-bottom: 1px dotted var(--border-color);
}

.quote-tile cite a:hover {
    color: var(--text-main);
    border-bottom-color: var(--text-main);
}

.quote-tile cite small {
	display: block;
	text-transform: none;
	letter-spacing: 0;
	font-size: 0.8rem;
	margin-top: 5px;
	font-weight: 400;
}

.footer-minimal {
    padding: 1rem 0 0 0;
    margin-top: 0rem;
    background: transparent;
    color: var(--text-faint);
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
}

.footer-minimal a {
    color: var(--text-muted);
    border-bottom: 1px dotted var(--text-faint);
}

.footer-minimal a:hover {
    color: var(--text-main);
    border-bottom-style: solid;
}

.text-center { text-align: center; }
.opacity-50 { opacity: 0.5; }

.star {
	height: 14px;
	display: inline;
	vertical-align: middle;
	margin-top: -3px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1200px) {
    :root { --gap: 30px; }
    .header-content, .linkedin-tile, .quote-tile { padding: 2.5rem; }
    .txt-box { padding: 2rem; }
    .serif-title { font-size: 3.5rem; }
}

@media (max-width: 1024px) {
    .grid-container { grid-template-columns: repeat(2, 1fr); }
    .span-2 { grid-column: span 2; }
    .span-4 { grid-column: span 2; }
    .book-tile { grid-column: span 2; }
    .project-tile { min-height: 450px; }
}

@media (min-width: 768px) {
	.mobile-only { display: none; }
}

@media (max-width: 768px) {
    :root { --gap: 2rem; }
    body { padding: 30px 20px; text-align: center; }
    .grid-container { grid-template-columns: 1fr; }
    .span-1, .span-2, .span-4, .book-tile { grid-column: span 1; }
	.linkedin-tile { padding: 2rem; }
    .linkedin-tile .brand { margin-bottom: 0; }
	.linkedin-tile .li-bottom { margin-top: 0; border-top: 0; }
    .book-tile { display: flex; flex-direction: column; min-height: auto; }
	.book-tile .txt-box { padding: 2rem; }
    .img-box, .book-tile .img-box { height: 250px; flex: none; }
	.project-tile { min-height: 0; }
	.project-tile .img-box { border-bottom: 0; margin-top: -20px; }
	.project-tile .txt-box { padding: 2rem; margin-top: -55px; z-index: 100; }
    .tile:hover { transform: none; }
    .header-content { padding: 2rem; }
    .serif-title { font-size: 2.75rem; }
    .manifesto { font-size: 1.25rem; max-width: 100%; margin-top: 2rem; }
    .desktop-only { display: none; }
    .txt-box { padding: 2rem; }
	.cred-tile { padding: 2rem; }
	.quote-tile { padding: 2rem; }
    .footer-minimal { margin-top: 0; padding-top: 0; padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .tile, .photo-tile img, .img-box img {
        animation: none;
        transition: none;
        opacity: 1;
        transform: none;
    }
}

@media print {
    body { background: #fff; color: #000; padding: 0; }
    .grid-container { display: block; }
    .tile { 
        break-inside: avoid; 
        border: 1px solid #ccc; 
        box-shadow: none !important; 
        margin-bottom: 20px;
        page-break-inside: avoid;
    }
    .img-box img, .photo-tile img { filter: grayscale(100%); }
    .btn-link-black, .li-bottom, .desktop-only { display: none; }
    .footer-minimal { margin-top: 2cm; border-top: 1px solid #000; padding: 1cm 0; }
}