:root {
  --bg: #080b12;
  --surface: #10151f;
  --surface-soft: #151b28;
  --text: #f6f3ec;
  --muted: #9aa3b3;
  --line: rgba(255, 255, 255, 0.11);
  --accent: #c96b38;
  --accent-dark: #a94f26;
  --blue: #607dff;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.ambient {
  position: fixed;
  z-index: -1;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  filter: blur(130px);
  opacity: .12;
  pointer-events: none;
}

.ambient-one { top: -10rem; right: -10rem; background: var(--blue); }
.ambient-two { top: 45rem; left: -20rem; background: var(--accent); }

.site-header {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 48px), var(--max));
  padding: 22px 0;
  border-bottom: 1px solid transparent;
  transform: translateX(-50%);
  transition: background .3s, border .3s, padding .3s;
}

.site-header.scrolled {
  width: 100%;
  padding: 16px max(24px, calc((100% - var(--max)) / 2));
  border-bottom-color: var(--line);
  background: rgba(8, 11, 18, .8);
  backdrop-filter: blur(18px);
}

.brand { display: inline-flex; align-items: center; gap: 11px; font-family: Manrope, sans-serif; font-size: 1.08rem; font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; overflow: hidden; border-radius: 10px; background: #080b12; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.35); }
.nav { display: flex; align-items: center; gap: 34px; color: #c1c7d2; font-size: .92rem; }
.nav a { transition: color .2s; }
.nav a:hover { color: var(--text); }
.nav-cta { padding: 11px 18px; border: 1px solid var(--line); border-radius: 100px; }
.menu-toggle { display: none; border: 0; background: none; }

.hero {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  min-height: 100vh;
  width: min(calc(100% - 48px), var(--max));
  margin: auto;
  padding: 140px 0 80px;
}

.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 25px; color: #c4cad5; font-size: .77rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow span { width: 22px; height: 2px; background: var(--accent); }
.hero h1, .contact h2 { margin: 0; font-family: Manrope, sans-serif; font-size: clamp(4.1rem, 7.5vw, 7.1rem); line-height: .93; letter-spacing: -.07em; }
.hero h1 em, .contact h2 em { color: var(--accent); font-style: normal; }
.hero-description { max-width: 590px; margin: 34px 0; color: var(--muted); font-size: 1.12rem; line-height: 1.75; }
.hero-actions { display: flex; gap: 13px; flex-wrap: wrap; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 30px; min-height: 52px; padding: 0 22px; border: 1px solid var(--line); border-radius: 7px; font-size: .92rem; font-weight: 700; transition: transform .2s, background .2s, border .2s; }
.button:hover { transform: translateY(-3px); }
.button-primary { border-color: var(--accent); background: var(--accent); color: #07120d; }
.button-primary:hover { background: #df8250; }
.button-ghost:hover { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.04); }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 540px; }
.hero-card { position: relative; z-index: 2; width: 285px; aspect-ratio: 1; overflow: hidden; border: 1px solid rgba(255,255,255,.2); border-radius: 30px; background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.025)); box-shadow: 0 40px 100px rgba(0,0,0,.4); backdrop-filter: blur(20px); transform: rotate(-5deg); }
.hero-card img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.orbit { position: absolute; border: 1px solid rgba(201,107,56,.25); border-radius: 50%; animation: spin 18s linear infinite; }
.orbit::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 25px var(--accent); }
.orbit-one { width: 430px; height: 430px; }
.orbit-one::after { top: 40px; right: 68px; }
.orbit-two { width: 540px; height: 280px; transform: rotate(35deg); animation-direction: reverse; animation-duration: 24s; }
.orbit-two::after { bottom: 26px; left: 90px; background: var(--blue); }
.floating-note { position: absolute; z-index: 3; padding: 10px 14px; border: 1px solid var(--line); border-radius: 100px; background: rgba(16,21,31,.8); color: #cdd2db; font-size: .74rem; backdrop-filter: blur(10px); }
.note-one { top: 18%; right: 1%; }
.note-two { bottom: 18%; left: 3%; }

.section { width: min(calc(100% - 48px), var(--max)); margin: auto; padding: 125px 0; }
.section-tag { padding-bottom: 20px; border-bottom: 1px solid var(--line); color: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.manifesto-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 80px; padding: 70px 0 80px; }
.manifesto h2, .work h2 { margin: 0; font-family: Manrope; font-size: clamp(2.7rem, 5vw, 4.8rem); line-height: 1.08; letter-spacing: -.055em; }
.manifesto h2 span, .work h2 span { color: var(--muted); }
.inc-heading h2 { margin-top: 0; }
.manifesto-copy { padding-top: 10px; color: var(--muted); font-size: 1.05rem; line-height: 1.8; }
.manifesto-copy p:first-child { margin-top: 0; color: #d8dce3; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principle { padding: 34px; border-right: 1px solid var(--line); }
.principle:first-child { padding-left: 0; }
.principle:last-child { border-right: 0; }
.principle span, .work-card > span { color: var(--accent); font-size: .72rem; font-weight: 700; }
.principle h3 { margin: 35px 0 12px; font-family: Manrope; font-size: 1.3rem; }
.principle p { margin: 0; color: var(--muted); line-height: 1.6; }

.story { width: 100%; max-width: none; padding-right: max(24px, calc((100% - var(--max)) / 2)); padding-left: max(24px, calc((100% - var(--max)) / 2)); background: #0c1018; }
.story-heading { display: flex; justify-content: space-between; align-items: end; padding: 65px 0 70px; }
.story-heading p { max-width: 270px; margin: 0; color: var(--muted); line-height: 1.6; }
.story-heading h2 { margin: 0; font-family: Manrope; font-size: clamp(3rem, 5vw, 5rem); letter-spacing: -.06em; }
.timeline-item { display: grid; grid-template-columns: 150px 40px 1fr; min-height: 185px; }
.year { padding-top: 5px; color: var(--accent); font-family: Manrope; font-size: 1.25rem; font-weight: 700; }
.timeline-line { position: relative; display: flex; justify-content: center; }
.timeline-line::before { content: ""; width: 1px; height: 100%; background: var(--line); }
.timeline-line span { position: absolute; top: 8px; width: 9px; height: 9px; border: 2px solid var(--bg); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(201,107,56,.14); }
.timeline-content { padding: 0 0 65px 45px; }
.timeline-content h3 { margin: 0 0 13px; font-family: Manrope; font-size: 1.45rem; }
.timeline-content p { max-width: 630px; margin: 0; color: var(--muted); line-height: 1.7; }

.work-intro { display: grid; grid-template-columns: 1.2fr .8fr; gap: 80px; align-items: end; padding: 70px 0; }
.work-intro p { margin: 0; color: var(--muted); line-height: 1.7; }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; padding-top: 70px; }
.work-card { position: relative; min-height: 385px; padding: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: transform .3s, border .3s; }
.work-card:hover { transform: translateY(-8px); border-color: rgba(201,107,56,.35); }
.work-card.featured { background: var(--accent); color: #07120d; }
.work-card.featured > span, .work-card.featured p { color: #4b2415; }
.work-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 80px; border: 1px solid var(--line); border-radius: 50%; font-size: 1.5rem; }
.work-card h3 { margin: 16px 0; font-family: Manrope; font-size: 1.55rem; }
.work-card p { max-width: 290px; color: var(--muted); line-height: 1.65; }
.card-arrow { position: absolute; right: 28px; bottom: 25px; font-size: 1.4rem; }

.projects { scroll-margin-top: 90px; }
.projects-heading { display: grid; grid-template-columns: 1.2fr .8fr; align-items: end; gap: 40px; padding: 55px 0 40px; }
.projects-heading h2 { margin: 0; font-family: Manrope, sans-serif; font-size: clamp(2.7rem, 5vw, 4.8rem); line-height: 1.08; letter-spacing: -.055em; }
.projects-heading h2 span { color: var(--accent); }
.projects-heading p, .projects-empty p, .project-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.projects-empty { grid-column: 1 / -1; padding: 48px 24px; border: 1px dashed var(--line); border-radius: 16px; background: var(--surface); text-align: center; }
.projects-symbol { display: inline-grid; place-items: center; width: 60px; height: 60px; border: 1px solid var(--line); border-radius: 14px; color: var(--accent); font-size: 1.4rem; font-weight: 700; }
.projects-empty h3 { margin: 22px 0 12px; font-family: Manrope, sans-serif; font-size: 1.4rem; }
.project-card { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: 30px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow-wrap: anywhere; transition: transform .2s, border-color .2s; }
.project-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.project-card h3 { margin: 0; font-family: Manrope, sans-serif; font-size: 1.65rem; }
.project-card .button { margin-top: auto; }
.project-card a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
@media (max-width: 900px) {
  .projects-heading { grid-template-columns: 1fr; gap: 24px; }
}

.quote-section { display: grid; place-items: center; min-height: 550px; text-align: center; }
.quote-section blockquote { max-width: 900px; margin: 0; font-family: Manrope; font-size: clamp(2.5rem, 5vw, 4.8rem); font-weight: 700; line-height: 1.15; letter-spacing: -.05em; }
.quote-section p { color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

.contact { width: 100%; max-width: none; padding-right: max(24px, calc((100% - var(--max)) / 2)); padding-left: max(24px, calc((100% - var(--max)) / 2)); background: var(--blue); }
.contact-inner { padding: 40px 0; }
.contact .eyebrow { color: #e2e5ff; }
.contact .eyebrow span { background: white; }
.contact h2 { max-width: 950px; font-size: clamp(3.5rem, 7vw, 6.5rem); }
.contact h2 em { color: #090d24; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 50px; }
.contact-actions .button { margin-top: 0; }
.button-light { border-color: white; background: white; color: #101329; }
.button-whatsapp, .button-github, .button-social { border-color: #101329; background: #101329; color: white; }
.button-whatsapp:hover, .button-github:hover, .button-social:hover { border-color: #252b45; background: #252b45; }
.company-socials { margin-top: 42px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,.3); }
.company-socials h3 { margin: 0; font-family: Manrope, sans-serif; font-size: 1.25rem; }
.company-socials .contact-actions { margin-top: 20px; }
.company-socials a:focus-visible { outline: 2px solid white; outline-offset: 4px; }

.education-page main { min-height: 100vh; }
.education-hero { width: min(calc(100% - 48px), var(--max)); margin: auto; padding: 190px 0 95px; }
.education-hero h1 { max-width: 850px; margin: 22px 0 28px; font-family: Manrope; font-size: clamp(3.5rem, 7vw, 6.7rem); line-height: .98; letter-spacing: -.065em; }
.education-hero h1 em { color: var(--accent); font-style: normal; }
.education-hero > p:last-child { max-width: 660px; margin: 0; color: var(--muted); font-size: 1.08rem; line-height: 1.8; }
.education-content { padding-top: 30px; }
.education-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; padding: 55px 0 45px; }
.education-heading h2 { max-width: 720px; margin: 0; font-family: Manrope; font-size: clamp(2.4rem, 5vw, 4.5rem); line-height: 1.08; letter-spacing: -.05em; }
.education-heading p { max-width: 310px; margin: 0; color: var(--muted); line-height: 1.65; }
.education-heading-centered { justify-content: center; text-align: center; }
.education-heading-centered p { max-width: 900px; color: var(--text); font-family: Manrope; font-size: clamp(2.2rem, 4.5vw, 4.2rem); font-weight: 700; line-height: 1.12; letter-spacing: -.045em; }
.school-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.school-card { min-height: 260px; padding: 30px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.school-number { display: block; margin-bottom: 70px; color: var(--accent); font-size: .74rem; font-weight: 700; letter-spacing: .12em; }
.school-card h3 { margin: 0 0 14px; font-family: Manrope; font-size: 1.45rem; line-height: 1.25; }
.school-card p { margin: 0; color: var(--muted); line-height: 1.6; }
.current-study { display: grid; grid-template-columns: .7fr 1.3fr; gap: 60px; margin-top: 80px; padding: 55px; border-radius: 22px; background: var(--accent); color: #170c07; }
.study-status { align-self: start; justify-self: start; padding: 9px 14px; border: 1px solid rgba(23,12,7,.28); border-radius: 100px; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.current-study h2 { margin: 0 0 20px; font-family: Manrope; font-size: clamp(2rem, 4vw, 3.7rem); line-height: 1.08; letter-spacing: -.045em; }
.current-study p { margin: 0; color: #4b2415; line-height: 1.7; }
.study-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.study-meta span { padding: 9px 13px; border-radius: 7px; background: rgba(23,12,7,.1); font-size: .8rem; font-weight: 700; }
.education-summary { max-width: 850px; margin: 75px auto 0; color: var(--text); font-family: Manrope; font-size: clamp(1.6rem, 3vw, 2.6rem); font-weight: 600; line-height: 1.4; letter-spacing: -.025em; text-align: center; }
.education-back { display: flex; justify-content: center; padding-top: 45px; }

.links-page main { min-height: 100vh; }
.links-hero { width: min(calc(100% - 48px), var(--max)); margin: auto; padding: 190px 0 75px; }
.links-hero h1 { max-width: 900px; margin: 22px 0 28px; font-family: Manrope; font-size: clamp(3.5rem, 7vw, 6.7rem); line-height: .98; letter-spacing: -.065em; }
.links-hero h1 em { color: var(--accent); font-style: normal; }
.links-hero > p:last-child { max-width: 660px; margin: 0; color: var(--muted); font-size: 1.08rem; line-height: 1.8; }
.personal-links { display: grid; gap: 15px; padding-top: 20px; }
.personal-link-card { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 30px; min-height: 170px; padding: 34px 38px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); transition: transform .3s, border .3s, background .3s; }
.personal-link-card:hover { transform: translateY(-5px); border-color: rgba(201,107,56,.45); background: var(--surface-soft); }
.personal-link-number { color: var(--accent); font-size: .74rem; font-weight: 700; letter-spacing: .12em; }
.personal-link-card h2 { margin: 0 0 10px; font-family: Manrope; font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -.035em; }
.personal-link-card p { margin: 0; color: var(--muted); line-height: 1.65; }
.personal-link-arrow { color: var(--accent); font-size: 2rem; transition: transform .2s; }
.personal-link-card:hover .personal-link-arrow { transform: translate(4px, -4px); }
.links-back { display: flex; justify-content: center; padding-top: 35px; }

footer { display: flex; align-items: center; justify-content: space-between; width: min(calc(100% - 48px), var(--max)); margin: auto; padding: 35px 0; color: var(--muted); font-size: .8rem; }
footer .brand { color: var(--text); font-size: .95rem; }
footer .brand-mark { width: 28px; height: 28px; border-radius: 8px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .75s ease, transform .75s ease; }
.reveal.visible { opacity: 1; transform: none; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .site-header { width: calc(100% - 32px); }
  .menu-toggle { z-index: 12; display: grid; gap: 6px; padding: 10px 0 10px 10px; }
  .menu-toggle span { display: block; width: 25px; height: 2px; background: var(--text); transition: transform .3s; }
  .menu-toggle.active span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-toggle.active span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav { position: fixed; inset: 0; display: flex; flex-direction: column; justify-content: center; background: rgba(8,11,18,.97); font-size: 1.5rem; opacity: 0; pointer-events: none; transition: opacity .25s; }
  .nav.open { opacity: 1; pointer-events: auto; }
  .hero { grid-template-columns: 1fr; width: calc(100% - 32px); padding-top: 155px; }
  .hero-visual { min-height: 470px; }
  .manifesto-grid, .work-intro { grid-template-columns: 1fr; gap: 35px; }
  .education-heading, .current-study { display: grid; grid-template-columns: 1fr; }
  .personal-link-card { grid-template-columns: 50px 1fr auto; }
  .school-grid { grid-template-columns: 1fr; }
  .school-card { min-height: auto; }
  .school-number { margin-bottom: 45px; }
  .current-study { gap: 35px; padding: 38px; }
  .principles, .work-grid { grid-template-columns: 1fr; }
  .principle, .principle:first-child { padding: 30px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .principle:last-child { border-bottom: 0; }
  .story-heading { display: block; }
  .story-heading h2 { margin-top: 24px; }
  .work-card { min-height: 330px; }
  footer { gap: 25px; flex-direction: column; text-align: center; }
}

@media (max-width: 560px) {
  .hero h1 { font-size: 3.45rem; }
  .hero-visual { min-height: 400px; transform: scale(.83); }
  .hero-actions .button { width: 100%; }
  .section { width: calc(100% - 32px); padding: 90px 0; }
  .education-hero { width: calc(100% - 32px); padding-top: 150px; }
  .education-hero h1 { font-size: 3.35rem; }
  .links-hero { width: calc(100% - 32px); padding-top: 150px; }
  .links-hero h1 { font-size: 3.35rem; }
  .personal-link-card { grid-template-columns: 1fr auto; gap: 18px; padding: 28px 24px; }
  .personal-link-number { grid-column: 1 / -1; }
  .current-study { padding: 28px; }
  .story, .contact { width: 100%; padding-right: 16px; padding-left: 16px; }
  .timeline-item { grid-template-columns: 88px 25px 1fr; }
  .timeline-content { padding-left: 20px; }
  .contact h2 { font-size: 3.15rem; }
  .contact-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
