:root {
  --black: #05070b;
  --navy: #071426;
  --deep-navy: #0b1d33;
  --white: #f7fbff;
  --ice-blue: #d9f2ff;
  --blue: #4fb8ff;
  --steel-blue: #8ca8bf;
  --silver: #c9d3dc;
  --muted: #9fb0c0;
  --panel: rgba(9, 21, 38, 0.82);
  --panel-solid: #0b1728;
  --border: rgba(217, 242, 255, 0.18);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius: 8px;
  --max-width: 1160px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --black: #f7fbff;
  --navy: #eef6ff;
  --deep-navy: #ffffff;
  --white: #071426;
  --ice-blue: #0f4d78;
  --blue: #0a69a9;
  --steel-blue: #50687d;
  --silver: #21384f;
  --muted: #576879;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --border: rgba(10, 65, 108, 0.16);
  --shadow: 0 20px 55px rgba(18, 48, 76, 0.14);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--white); background: radial-gradient(circle at top right, rgba(79, 184, 255, 0.15), transparent 34rem), linear-gradient(135deg, var(--black), var(--navy) 45%, var(--black)); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; line-height: 1.6; }
a { color: inherit; }
button, input, textarea { font: inherit; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: 0; }
h1 { font-size: clamp(3rem, 8vw, 6.7rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: 1.08rem; }
p { margin: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: 0.75rem 1rem; border-radius: var(--radius); background: var(--ice-blue); color: #04111f; transition: top 160ms ease; }
.skip-link:focus { top: 1rem; }
.container { width: min(100% - 2rem, var(--max-width)); margin-inline: auto; }
.narrow { max-width: 780px; }
.section-shell { position: relative; padding: 5rem 0; }
.section-muted { border-block: 1px solid var(--border); background: linear-gradient(120deg, rgba(217, 242, 255, 0.05), rgba(79, 184, 255, 0.03)); }
.site-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--border); background: rgba(5, 7, 11, 0.78); backdrop-filter: blur(18px); }
:root[data-theme="light"] .site-header { background: rgba(247, 251, 255, 0.88); }
.navbar { width: min(100% - 2rem, var(--max-width)); min-height: 72px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; font-weight: 900; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, rgba(217, 242, 255, 0.16), rgba(79, 184, 255, 0.08)); color: var(--ice-blue); box-shadow: 0 0 26px rgba(79, 184, 255, 0.18); }
.brand-name { letter-spacing: 0.16em; }
.nav-panel { display: flex; align-items: center; gap: 0.75rem; }
.nav-links { display: flex; align-items: center; gap: 0.2rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 0.78rem; border-radius: var(--radius); color: var(--muted); text-decoration: none; transition: color 160ms ease, background 160ms ease; }
.nav-links a:hover, .nav-links a:focus-visible, .nav-links a[aria-current="page"] { color: var(--white); background: rgba(217, 242, 255, 0.09); }
.menu-toggle, .theme-toggle, .button { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); color: var(--white); cursor: pointer; }
.theme-toggle { min-height: 40px; padding: 0 0.9rem; color: var(--ice-blue); }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 0; }
.menu-toggle span { display: block; width: 18px; height: 2px; margin: 3px auto; background: var(--white); }
.hero { min-height: calc(100vh - 72px); display: flex; align-items: center; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(217,242,255,0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(217,242,255,0.04) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom, black, transparent 92%); }
.hero::after { content: ""; position: absolute; right: 5%; top: 22%; width: min(42vw, 520px); aspect-ratio: 1.8; pointer-events: none; border: 1px solid var(--border); background: linear-gradient(135deg, rgba(217,242,255,0.08), transparent), repeating-linear-gradient(90deg, rgba(217,242,255,0.22) 0 1px, transparent 1px 38px); opacity: 0.55; filter: blur(0.2px); transform: skewY(-6deg); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.85fr); gap: 2rem; align-items: center; }
.eyebrow { margin-bottom: 0.7rem; color: var(--ice-blue); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.hero-tagline { margin-top: 1rem; color: var(--blue); font-size: clamp(1.08rem, 2vw, 1.35rem); font-weight: 800; }
.mission { max-width: 610px; margin-top: 1.25rem; color: var(--silver); font-size: 1.12rem; }
.rome-time { width: fit-content; max-width: 100%; display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: baseline; margin-top: 1rem; padding: 0.55rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(217, 242, 255, 0.055); color: var(--silver); font-size: 0.88rem; font-style: italic; }
.rome-time span { color: var(--muted); font-weight: 900; letter-spacing: 0.08em; font-style: normal; }
.rome-time strong { color: var(--ice-blue); font-weight: 900; }
.rome-time em { color: var(--steel-blue); font-style: normal; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 1rem; text-decoration: none; font-weight: 900; transition: transform 160ms ease, border-color 160ms ease; }
.button:hover, .button:focus-visible { transform: translateY(-2px); border-color: rgba(217, 242, 255, 0.44); }
.button-primary { background: linear-gradient(135deg, var(--white), var(--ice-blue)); color: #05101f; }
.button-secondary { background: rgba(217, 242, 255, 0.06); color: var(--ice-blue); }
.status-card, .info-card, .skill-core, .skill-branch, .micro-card, .timeline-node, .system-panel, .book-card, .cv-document { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.status-card { padding: 1.25rem; }
.panel-topline { display: flex; justify-content: space-between; gap: 1rem; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 1rem; margin-bottom: 1rem; }
.panel-topline .eyebrow { margin: 0; }
.panel-topline span, .card-code { color: var(--ice-blue); font-size: 0.75rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.status-list { margin: 1rem 0 0; }
.status-list div { display: grid; grid-template-columns: 150px 1fr; gap: 1rem; padding: 0.86rem 0; border-bottom: 1px solid var(--border); }
.status-list div:last-child { border-bottom: 0; }
.status-list dt { color: var(--muted); font-weight: 900; }
.status-list dd { margin: 0; color: var(--white); }
.section-heading { max-width: 760px; margin-bottom: 2rem; }
.section-heading p:last-child, .page-hero p, .info-card p, .micro-card p, .timeline-node p, .system-panel li { color: var(--muted); }
.skill-core { width: min(100%, 460px); margin: 0 auto 2rem; padding: 1.3rem; text-align: center; background: linear-gradient(145deg, rgba(217,242,255,0.10), rgba(79,184,255,0.06)), var(--panel); }
.skill-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.skill-branch { padding: 1.15rem; }
.skill-branch h3 { color: var(--ice-blue); }
.skill-branch ul { margin: 0.9rem 0 0; padding-left: 1.1rem; color: var(--silver); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.campus-panel { display: grid; grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1fr); gap: 1.25rem; align-items: center; margin-top: 1rem; padding: 1rem; overflow: hidden; }
.campus-panel img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: calc(var(--radius) - 2px); filter: saturate(0.72) contrast(1.05) brightness(0.72); }
.campus-panel h3 { color: var(--white); font-size: 1.45rem; }
.campus-panel p:last-child { margin-top: 0.65rem; color: var(--muted); }
.info-card { min-height: 220px; display: flex; flex-direction: column; justify-content: space-between; padding: 1.2rem; color: var(--white); text-decoration: none; transition: transform 160ms ease, border-color 160ms ease, background 160ms ease; }
.info-card:hover, .info-card:focus-visible { transform: translateY(-4px); border-color: rgba(217,242,255,0.42); background: rgba(13, 33, 58, 0.88); }
.info-card h2 { font-size: 1.35rem; }
.info-card h3, .micro-card h3 { margin-top: 1rem; }
.inline-link { color: var(--ice-blue); font-weight: 900; }
.split-layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr); gap: 2rem; align-items: start; }
.mini-path { display: grid; gap: 0.8rem; }
.mini-path span { padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); color: var(--ice-blue); font-weight: 900; }
.compact-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.micro-card { min-height: 150px; padding: 1rem; color: var(--white); text-decoration: none; }
.personal-fuel { opacity: 0.88; }
.contact-band { border-top: 1px solid var(--border); background: linear-gradient(135deg, rgba(217,242,255,0.08), rgba(79,184,255,0.05)); }
.contact-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.page-hero { border-bottom: 1px solid var(--border); background: linear-gradient(135deg, rgba(217,242,255,0.08), rgba(79,184,255,0.04)); }
.timeline-map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.timeline-node { padding: 1.2rem; }
.timeline-node span { color: var(--ice-blue); font-weight: 900; }
.timeline-node h2 { margin-top: 0.55rem; font-size: 1.4rem; }
.system-panel { padding: 1.2rem; }
.system-panel ul { margin: 1rem 0 0; padding-left: 1.1rem; }
.book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.book-card { padding: 1.2rem; }
.book-meta, .book-tags { color: var(--muted); margin-top: 0.5rem; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.tag-cloud span { padding: 0.55rem 0.8rem; border: 1px solid var(--border); border-radius: 999px; background: var(--panel); color: var(--ice-blue); }
.cv-body { background: var(--black); }
.cv-document { width: min(100% - 2rem, 920px); margin: 3rem auto; padding: 2rem; }
.cv-header { display: flex; justify-content: space-between; gap: 2rem; padding-bottom: 1rem; border-bottom: 2px solid var(--border); }
.cv-header h1 { font-size: 2.6rem; }
.cv-header address { color: var(--muted); font-style: normal; text-align: right; }
.cv-section { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.cv-section:last-child { border-bottom: 0; }
.cv-section h2 { margin-bottom: 0.45rem; color: var(--ice-blue); font-size: 1.15rem; }
.cv-section ul { margin: 0; padding-left: 1.15rem; color: var(--silver); }
.cv-section p { color: var(--silver); }
.cv-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.site-footer { padding: 2rem 1rem; border-top: 1px solid var(--border); color: var(--muted); text-align: center; }
/* Cat companion image. Replace cat.png later if you want a different companion. */
.cat-companion { position: fixed; left: 0; top: 0; z-index: 60; width: 38px; height: 28px; pointer-events: none; opacity: 0; transform: translate(-50px, -50px); transition: opacity 180ms ease; background: url("cat.png") center / contain no-repeat; image-rendering: pixelated; filter: drop-shadow(0 0 8px rgba(217, 242, 255, 0.32)); }
.cat-companion::before, .cat-companion::after { content: none; }
.cat-companion.is-visible { opacity: 0.9; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 480ms ease, transform 480ms ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@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; } .reveal { opacity: 1; transform: none; } .cat-companion { display: none; } }
@media (max-width: 1000px) { .hero-grid, .split-layout { grid-template-columns: 1fr; } .skill-grid, .card-grid, .compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hero::after { opacity: 0.28; } }
@media (max-width: 760px) { .campus-panel { grid-template-columns: 1fr; } .rome-time { width: 100%; font-size: 0.8rem; } .navbar { min-height: 64px; } .menu-toggle { display: block; } .nav-panel { position: absolute; left: 1rem; right: 1rem; top: 72px; display: none; flex-direction: column; align-items: stretch; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel-solid); box-shadow: var(--shadow); } .nav-panel.is-open { display: flex; } .nav-links { flex-direction: column; align-items: stretch; } .nav-links a, .theme-toggle { width: 100%; justify-content: center; } .section-shell { padding: 3.4rem 0; } .hero { min-height: auto; padding-top: 4rem; } .status-list div, .skill-grid, .card-grid, .compact-grid, .timeline-map, .book-grid, .cv-two-col { grid-template-columns: 1fr; } .status-list div { gap: 0.25rem; } .contact-row, .cv-header { flex-direction: column; align-items: flex-start; } .cv-header address { text-align: left; } .cat-companion { display: none; } }
@media (hover: none), (pointer: coarse) { .cat-companion { display: none; } }
