@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --ink: #f3f5ee;
    --muted: #9ca49d;
    --dim: #68716b;
    --surface: #151916;
    --surface-2: #1b201c;
    --line: rgba(243, 245, 238, .12);
    --accent: #c5f36a;
    --accent-soft: rgba(197, 243, 106, .12);
    --sidebar: 270px;
    --content: 900px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: #0d100e;
    color: var(--ink);
    font-family: 'DM Sans', sans-serif;
    line-height: 1.6;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .35;
    background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
    background-size: 44px 44px;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.navbar {
    position: fixed;
    z-index: 10;
    inset: 0 auto 0 0;
    width: var(--sidebar);
    padding: 42px 30px 30px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
    background: rgba(13, 16, 14, .9);
    backdrop-filter: none;
}
.logo { color: var(--accent); font: 700 27px/1 'Space Grotesk', sans-serif; letter-spacing: -.06em; }
.logo::after { content: '.'; color: var(--ink); }
.sidebar-profile { margin-top: 56px; }
.sidebar-photo { width: 100%; aspect-ratio: 1 / 1.12; padding: 10px; background: var(--surface); border: 1px solid var(--line); }
.sidebar-photo img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-photo img.asset-missing { display: none; }
.sidebar-photo:has(img.asset-missing) { background: linear-gradient(145deg, var(--surface), var(--accent-soft)); }
.sidebar-role { margin: 18px 0 8px; color: var(--ink); font: 600 14px/1.35 'Space Grotesk', sans-serif; }
.sidebar-email { margin: 18px 0 4px; color: var(--ink); font-size: 12px; overflow-wrap: anywhere; }
.sidebar-place { margin: 0; color: var(--dim); font-size: 12px; }
.sidebar-copyright { margin: 24px 0 18px; color: var(--dim); font-size: 10px; }
.sidebar-social { display: flex; justify-content: center; gap: 14px; color: var(--muted); }
.sidebar-social a:hover { color: var(--accent); }
.sidebar-cta { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 20px; padding: 12px 8px; color: #10140e; background: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.nav-links { position: fixed; z-index: 11; top: 50%; right: 32px; display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; transform: translateY(-50%); }
.nav-links a {
    position: relative; display: grid; place-items: center; width: 43px; height: 43px; color: var(--muted); background: rgba(21, 25, 22, .75); border: 1px solid var(--line); border-radius: 50%; font-size: 13px; transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}
.nav-links span { position: absolute; right: 54px; display: none; padding: 5px 8px; color: var(--ink); background: var(--surface-2); font-size: 10px; white-space: nowrap; text-transform: uppercase; letter-spacing: .1em; }
.nav-links a:hover span, .nav-links a.active span { display: block; }
.nav-links a:hover, .nav-links a.active { color: #10140e; background: var(--accent); border-color: var(--accent); transform: scale(1.08); }
.menu-toggle { position: fixed; z-index: 12; top: 34px; right: 7%; display: grid; place-items: center; width: 70px; height: 70px; color: var(--ink); background: var(--surface); border: 1px solid rgba(243, 245, 238, .25); border-radius: 50%; cursor: pointer; font-size: 20px; }

main, footer { margin-left: var(--sidebar); }
section { position: relative; max-width: var(--content); margin: 0 auto; padding: 120px 56px; }
#hero { min-height: 100vh; display: flex; align-items: center; padding-top: 80px; }
.hero-content { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 48px; width: 100%; }
.hero-text { max-width: 650px; }
.greeting, .section-kicker { margin: 0 0 24px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.greeting::before { content: '-> '; }
.hero-title, .section-title { margin: 0; font: 600 clamp(42px, 6vw, 78px)/.98 'Space Grotesk', sans-serif; letter-spacing: -.065em; }
.hero-title span:last-child, .section-title span, .timeline-title span { color: var(--accent); }
.hero-subtitle { margin: 28px 0 18px; color: var(--muted); font: 500 clamp(19px, 2.5vw, 29px)/1.25 'Space Grotesk', sans-serif; }
.hero-description { max-width: 590px; margin: 0; color: var(--muted); font-size: 16px; }
.hero-widgets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 38px 0 30px; }
.dashboard-card { min-height: 130px; padding: 17px; background: var(--surface); border: 1px solid var(--line); }
.dashboard-card h3 { margin: 0 0 9px; color: var(--ink); font: 600 14px 'Space Grotesk', sans-serif; }
.dashboard-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 14px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 18px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--accent); transition: transform .2s ease, background .2s ease, color .2s ease; }
.btn-primary { background: var(--accent); color: #10140e; }
.btn-secondary { color: var(--accent); }
.btn:hover { transform: translateY(-3px); background: var(--ink); color: #10140e; border-color: var(--ink); }
.hero-image { display: none; justify-self: end; width: min(100%, 280px); }
.profile-container { position: relative; padding: 12px; border: 1px solid var(--line); background: var(--surface); }
.profile-container::after { content: ''; position: absolute; inset: 22px -16px -16px 22px; z-index: -1; border: 1px solid var(--accent); }
.profile-img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.profile-img.asset-missing { display: none; }
.profile-container:has(.profile-img.asset-missing) { min-height: 260px; background: linear-gradient(135deg, var(--surface), var(--accent-soft)); }

section:not(#hero) { border-top: 1px solid var(--line); }
.section-title { font-size: clamp(35px, 4.8vw, 58px); }
.section-title::before { content: attr(id); display: block; margin-bottom: 20px; color: var(--accent); font: 700 11px 'DM Sans', sans-serif; letter-spacing: .22em; text-transform: uppercase; }
.about-content, .contact-container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 52px; margin-top: 42px; }
.about-text p, .timeline-description, .gallery-subtitle { color: var(--muted); font-size: 16px; }
.about-text p { margin: 0 0 20px; }
.about-highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.highlight-item { padding: 21px; background: var(--surface); border: 1px solid var(--line); }
.highlight-icon { color: var(--accent); font-size: 19px; }
.highlight-title { margin: 13px 0 6px; font: 600 16px 'Space Grotesk', sans-serif; }
.highlight-item p { margin: 0; color: var(--muted); font-size: 12px; }
.gallery-subtitle { margin: 22px 0 28px; }
.extension-grid, .projects-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.extension-card, .project-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.extension-card img, .project-image { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; filter: saturate(.8); transition: transform .35s ease; }
.extension-card:hover img, .project-card:hover .project-image { transform: scale(1.04); }
.extension-caption { padding: 15px 17px; color: var(--ink); font-size: 13px; }
.timeline { position: relative; margin-top: 46px; padding-left: 28px; border-left: 1px solid var(--line); }
.timeline-item { position: relative; padding: 0 0 44px 27px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; top: 5px; left: -34px; width: 12px; height: 12px; background: var(--accent); box-shadow: 0 0 0 5px #0d100e; }
.timeline-date { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.timeline-title { margin: 10px 0 8px; font: 600 24px 'Space Grotesk', sans-serif; }
.timeline-location { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 13px; }
.institution-logo, .institution-logo-rounded { width: 34px; height: 34px; object-fit: contain; padding: 4px; background: #fff; border-radius: 50%; }
.timeline-description { max-width: 670px; margin: 15px 0 0; font-size: 14px; }
.part-time { display: inline; color: var(--dim); font-size: 12px; }
.skill-category { margin-top: 44px; padding: 24px 0; border-top: 1px solid var(--line); }
.skill-category-title { margin: 0 0 22px; color: var(--accent); font: 600 19px 'Space Grotesk', sans-serif; }
.skill-item { margin: 19px 0; }
.skill-info { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 13px; }
.skill-level { color: var(--accent); }
.skill-progress { height: 3px; margin-top: 9px; background: var(--surface-2); }
.progress-bar { height: 100%; background: var(--accent); }
.project-content { padding: 22px; }
.project-title { margin: 0; font: 600 21px 'Space Grotesk', sans-serif; }
.project-description { min-height: 70px; margin: 12px 0 18px; color: var(--muted); font-size: 13px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project-tag { padding: 5px 8px; color: var(--accent); background: var(--accent-soft); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.project-links { display: flex; gap: 12px; margin-top: 21px; color: var(--accent); font-size: 16px; }
.contact-info { display: grid; align-content: start; gap: 22px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-icon { color: var(--accent); font-size: 18px; }
.contact-detail h3 { margin: 0 0 4px; font: 600 16px 'Space Grotesk', sans-serif; }
.contact-detail p { margin: 0; color: var(--muted); font-size: 13px; }
.contact-social { display: flex; gap: 18px; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.social-link { color: var(--muted); font-size: 18px; }
.social-link:hover { color: var(--accent); }
.contact-form { padding: 25px; background: var(--surface); border: 1px solid var(--line); }
.form-group { margin-bottom: 14px; }
.form-group input, .form-group textarea { width: 100%; padding: 13px 14px; resize: vertical; color: var(--ink); background: #101310; border: 1px solid var(--line); font: inherit; font-size: 13px; outline: none; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }
.contact-form .btn { cursor: pointer; }
.download-cv { justify-content: center; }
footer { padding: 35px 56px; color: var(--dim); font-size: 11px; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
    :root { --sidebar: 0px; }
    .navbar { inset: 0 0 auto; width: auto; height: 72px; padding: 0 22px; flex-direction: row; align-items: center; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--line); }
    .sidebar-profile { display: none; }
    .menu-toggle { top: 14px; right: 20px; width: 44px; height: 44px; background: transparent; border: 0; }
    .nav-links { position: absolute; inset: 72px 0 auto; display: none; padding: 16px 22px 22px; margin: 0; background: #0d100e; border-bottom: 1px solid var(--line); transform: none; }
    .nav-links a { width: auto; height: auto; display: flex; justify-content: flex-start; gap: 13px; padding: 11px 14px; border: 0; border-radius: 0; background: transparent; font-size: 12px; }
    .nav-links span { position: static; display: inline; padding: 0; background: transparent; font-size: 12px; }
    .nav-links a:hover span, .nav-links a.active span { display: inline; }
    .nav-links.open { display: grid; }
    .menu-toggle { display: block; padding: 10px; color: var(--accent); background: transparent; border: 0; font-size: 19px; }
    main, footer { margin-left: 0; }
    section { padding: 100px 25px; }
    #hero { min-height: auto; padding-top: 130px; }
    .hero-content, .about-content, .contact-container { grid-template-columns: 1fr; }
    .hero-image { display: block; order: -1; justify-self: start; width: min(100%, 210px); }
    .hero-widgets { grid-template-columns: 1fr; }
    .extension-grid, .projects-container { grid-template-columns: 1fr; }
    footer { padding: 28px 25px; }
}

@media (prefers-reduced-motion: no-preference) {
    section { animation: reveal .7s both; }
    @keyframes reveal { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}
/* Academic research overview */
.research-layout { display: grid; gap: 30px; margin-top: 35px; }
.research-image { width: 100%; height: auto; border: 1px solid var(--line); }
#skills .skill-item { padding: 9px 0; border-bottom: 1px solid var(--line); }
