:root {
  --paper: #f1efe7;
  --paper-deep: #e7e4da;
  --ink: #171916;
  --muted: #696b64;
  --line: #c9c7bd;
  --night: #111411;
  --night-soft: #1a1e1a;
  --green: #60e34a;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); }
section[id] { scroll-margin-top: 82px; }
a { color: inherit; text-decoration: none; }
.light, .dark, footer, .header { padding-inline: max(24px, calc((100vw - 1240px) / 2)); }
.skip-link { position: fixed; z-index: 100; top: -70px; left: 18px; padding: 11px 15px; color: var(--paper); background: var(--ink); transition: top .2s; }
.skip-link:focus { top: 18px; }
:focus-visible { outline: 2px solid #3e7338; outline-offset: 4px; }

.header { position: fixed; z-index: 10; top: 0; width: 100%; height: 82px; display: grid; grid-template-columns: 1fr auto; align-items: center; border-bottom: 1px solid rgba(23,25,22,.14); background: rgba(241,239,231,.88); backdrop-filter: blur(18px); }
.identity { display: flex; align-items: center; gap: 12px; font-weight: 650; letter-spacing: -.02em; }
nav { display: flex; gap: 34px; font-size: .73rem; text-transform: uppercase; letter-spacing: .11em; }
nav a { transition: opacity .2s; }
nav a:hover { opacity: .55; }
.menu-button { display: none; width: 40px; height: 40px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.menu-button span { display: block; width: 22px; height: 1px; margin: 5px auto; background: var(--ink); transition: transform .2s; }
.menu-button[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.menu-button[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }

.hero { min-height: 100vh; padding-top: 130px; padding-bottom: 34px; display: flex; flex-direction: column; background: radial-gradient(circle at 78% 48%, rgba(124,135,113,.15), transparent 25%), var(--paper); }
.hero-meta { display: flex; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; }
.hero-meta p { margin: 0; }
.hero-main { flex: 1; display: grid; grid-template-columns: 1.35fr .65fr; gap: 6vw; align-items: center; padding: 60px 0 35px; }
.kicker { margin: 0 0 22px; font: italic 1.2rem var(--serif); }
h1 { margin: 0; font-size: clamp(4.2rem, 7.5vw, 8rem); line-height: .87; letter-spacing: -.075em; font-weight: 600; }
h1 em, h2 i { font-family: var(--serif); font-weight: 400; }
.lead { max-width: 560px; margin: 38px 0 32px; color: var(--muted); font-size: 1.08rem; line-height: 1.7; }
.text-link { display: inline-flex; gap: 50px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; }
.text-link span { transition: transform .25s; }
.text-link:hover span { transform: translate(4px, 4px); }
.profile-panel { position: relative; width: min(100%,390px); justify-self: end; padding: 24px; border: 1px solid var(--line); background: rgba(255,255,255,.2); box-shadow: 18px 18px 0 rgba(201,199,189,.36); overflow: hidden; }
.profile-panel::before { content: ""; position: absolute; width: 250px; height: 250px; right: -110px; top: -110px; border: 1px solid rgba(86,96,82,.15); border-radius: 50%; box-shadow: 0 0 0 36px rgba(86,96,82,.035),0 0 0 72px rgba(86,96,82,.025); }
.profile-top { position: relative; display: flex; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .58rem; letter-spacing: .14em; }
.profile-name { position: relative; display: flex; flex-direction: column; margin: 45px 0 48px; font: 500 clamp(4.2rem,7vw,6.2rem)/.72 var(--serif); letter-spacing: -.075em; }
.profile-name span:last-child { align-self: flex-end; color: #697065; font-style: italic; }
.profile-details { position: relative; margin: 0; border-top: 1px solid var(--line); }
.profile-details div { display: grid; grid-template-columns: 115px 1fr; gap: 15px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.profile-details dt { color: var(--muted); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; }
.profile-details dd { margin: 0; font-size: .72rem; text-align: right; }
.profile-line { position: absolute; left: 0; bottom: 0; width: 38%; height: 3px; background: #6d7968; }
.scroll-note { margin: 0; color: var(--muted); font-size: .64rem; text-transform: uppercase; letter-spacing: .13em; }
.scroll-note span { margin-left: 10px; }

.about { padding-top: 145px; padding-bottom: 160px; background: var(--paper-deep); }
.section-label { margin: 0 0 66px; font-size: .66rem; text-transform: uppercase; letter-spacing: .17em; }
.about-grid, .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9vw; }
h2 { margin: 0; font-size: clamp(3.2rem, 5.5vw, 6.2rem); line-height: .92; letter-spacing: -.065em; font-weight: 570; }
.about-copy { padding-top: 6px; }
.about-copy > p { max-width: 590px; margin: 0 0 22px; color: #555850; font-size: 1.12rem; line-height: 1.75; }
.about-copy > p:first-child { color: var(--ink); font-size: 1.35rem; }
.facts { display: grid; grid-template-columns: repeat(3,1fr); gap: 15px; margin-top: 52px; padding-top: 25px; border-top: 1px solid var(--line); }
.facts div { display: flex; gap: 13px; }
.facts strong { font: italic 1.35rem var(--serif); }
.facts span { color: var(--muted); font-size: .7rem; line-height: 1.45; text-transform: uppercase; letter-spacing: .07em; }

.skills { padding-top: 135px; padding-bottom: 145px; background: var(--paper); }
.skills-heading { display: grid; grid-template-columns: 1fr .55fr; gap: 8vw; align-items: end; margin-bottom: 58px; }
.skills-heading > p { max-width: 480px; margin: 0; color: var(--muted); line-height: 1.7; }
.skill-grid { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.skill-card { position: relative; min-height: 260px; padding: 25px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.skill-card > span { color: #989a92; font-size: .62rem; }
.skill-card > i { position: absolute; top: 24px; right: 24px; color: #70766c; font-size: 1.2rem; }
.skill-card h3 { margin: 82px 0 13px; font-size: 1.45rem; letter-spacing: -.035em; }
.skill-card p { max-width: 270px; margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.6; }
.skill-card.learning { color: #edf0e9; background: #252a24; }
.skill-card.learning > span,.skill-card.learning > i,.skill-card.learning p { color: #aeb4aa; }

.dark { color: #eef0e9; background: var(--night); }
.work { padding-top: 135px; padding-bottom: 145px; }
.work-heading { display: grid; grid-template-columns: 1fr .5fr; gap: 8vw; align-items: end; padding-bottom: 65px; border-bottom: 1px solid #373b36; }
.work-heading .section-label { color: #93998f; }
.work-heading > p { max-width: 420px; margin: 0; color: #9da39a; line-height: 1.65; }
.project { position: relative; display: grid; grid-template-columns: 55px minmax(260px,.75fr) 1fr 45px; gap: clamp(20px,4vw,65px); align-items: center; padding: 38px 0; border-bottom: 1px solid #373b36; }
.project-no { align-self: start; padding-top: 5px; color: #6e756c; font-size: .68rem; }
.project-visual { position: relative; height: 270px; display: grid; place-items: center; overflow: hidden; transition: transform .35s ease; }
a.project:hover .project-visual { transform: scale(.985); }
.project-visual > span { position: absolute; left: 18px; bottom: 14px; color: rgba(255,255,255,.56); font-size: .54rem; letter-spacing: .16em; }
.zoncuu-visual { background: radial-gradient(circle, rgba(96,227,74,.13), transparent 45%), repeating-linear-gradient(0deg, transparent 0 30px, rgba(96,227,74,.04) 31px), #080b09; border: 1px solid #253126; }
.rupulaattori-logo { display: flex; align-items: center; gap: 15px; }
.rupulaattori-mark { position: relative; width: 72px; height: 72px; display: grid; place-items: center; border: 1px solid color-mix(in srgb,var(--green) 34%,#25302b); color: var(--green); background: radial-gradient(circle,rgba(96,227,74,.14),transparent 65%); clip-path: polygon(0 0,78% 0,100% 22%,100% 100%,22% 100%,0 78%); }
.rupulaattori-mark::before, .rupulaattori-mark::after { content: ""; position: absolute; width: 11px; height: 11px; border-color: var(--green); }
.rupulaattori-mark::before { left: 7px; top: 7px; border-left: 1px solid; border-top: 1px solid; }
.rupulaattori-mark::after { right: 7px; bottom: 7px; border-right: 1px solid; border-bottom: 1px solid; }
.rupulaattori-mark i { font-style: normal; font-size: 35px; font-weight: 700; transform: translate(-3px,-2px); }
.rupulaattori-mark b { position: absolute; right: 8px; bottom: 7px; color: #eef5da; font-size: 9px; letter-spacing: .05em; }
.rupulaattori-copy { display: flex; flex-direction: column; line-height: 1.05; }
.rupulaattori-copy strong { font-size: 17px; letter-spacing: .08em; }
.rupulaattori-copy small { margin-top: 7px; color: var(--green); font-size: 8px; letter-spacing: .13em; }
.course-visual { background: radial-gradient(circle at 75% 12%, rgba(37,99,235,.22), transparent 36%), linear-gradient(145deg,#0a1728,#07111f); border: 1px solid rgba(96,165,250,.22); }
.html26-preview { width: min(86%,360px); }
.html26-brand { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; color: #f7f9fc; }
.html26-brand strong { font-size: 1rem; letter-spacing: .08em; }
.html26-brand small { color: #758195; font-size: .62rem; }
.html26-window { overflow: hidden; border: 1px solid rgba(174,185,200,.18); border-radius: 11px; background: #050b13; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.html26-windowbar { height: 34px; display: flex; align-items: center; gap: 5px; padding: 0 11px; border-bottom: 1px solid rgba(174,185,200,.16); color: #758195; font: .55rem ui-monospace,monospace; }
.html26-windowbar i { width: 6px; height: 6px; border-radius: 50%; background: #283445; }
.html26-windowbar span { margin-left: 5px; }
.html26-window code { display: block; padding: 17px; color: #e8edf4; font: .62rem/1.8 ui-monospace,monospace; }
.html26-window code b { color: #7db2ff; font-weight: 400; }
.html26-window code em { color: #22d3ee; font-style: normal; }
.html26-window code mark { color: #86efac; background: none; }
.html26-window code span { position: static; color: #facc15; font-size: inherit; letter-spacing: 0; }
.course-visual > span { color: #758195; }
.tag { color: var(--green); font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; }
.project-info h3 { margin: 13px 0 14px; font-size: clamp(2.2rem,4vw,4rem); letter-spacing: -.055em; }
.project-info p { max-width: 490px; margin: 0; color: #929890; line-height: 1.65; }
.project-tech { display: flex; flex-wrap: wrap; gap: 7px; margin: 23px 0 0; padding: 0; list-style: none; }
.project-tech li { padding: 6px 9px; border: 1px solid #3c423b; color: #a8aea5; font-size: .57rem; letter-spacing: .1em; text-transform: uppercase; }
.project-arrow { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #454b44; border-radius: 50%; transition: .3s; }
.project:hover .project-arrow { color: #101310; background: var(--green); border-color: var(--green); transform: rotate(45deg); }

.contact { padding-top: 145px; padding-bottom: 150px; background: #ece9df; }
.contact-intro p { max-width: 500px; margin: 34px 0 0; color: var(--muted); line-height: 1.7; }
.contact-side { padding-top: 4px; }
.contact-cards { display: grid; gap: 10px; }
.contact-card { min-height: 102px; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 9px 18px; padding: 18px 22px; border: 1px solid var(--line); background: rgba(255,255,255,.23); transition: transform .2s,border-color .2s; }
.contact-icon { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: #50544d; font-size: 1rem; }
.contact-card > div { display: flex; flex-direction: column; gap: 8px; }
.contact-card small { color: var(--muted); font-size: .61rem; text-transform: uppercase; letter-spacing: .13em; }
.contact-card strong { font-size: 1.18rem; font-weight: 550; }
.contact-card span { color: var(--muted); font-size: .66rem; text-align: right; }
a.contact-card:hover { transform: translateX(4px); border-color: #94978e; }
.primary-contact { color: #edf0e9; background: var(--ink); border-color: var(--ink); }
.primary-contact small,.primary-contact span { color: #a9aea5; }
.primary-contact .contact-icon { color: #edf0e9; border-color: #484c46; }
.social-block { margin-top: 38px; }
.social-block > p { margin: 0 0 13px; color: var(--muted); font-size: .63rem; text-transform: uppercase; letter-spacing: .13em; }
.social-list { border-top: 1px solid var(--line); }
.social-list a,.social-entry { width: 100%; display: grid; grid-template-columns: 34px 1fr 1fr auto; align-items: center; gap: 14px; padding: 14px 2px; border: 0; border-bottom: 1px solid var(--line); color: inherit; background: transparent; font: inherit; text-align: left; transition: padding .2s,background .2s; }
.social-list a:hover,.copy-discord:hover { padding-inline: 8px; }
.copy-discord { cursor: pointer; }
.social-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); font-size: .92rem; }
.social-list span { color: var(--muted); font-size: .68rem; }
.social-list strong { font-size: .8rem; font-weight: 550; }
.social-list b { color: var(--muted); font-size: .75rem; font-weight: 400; }
footer { min-height: 110px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: .65rem; text-transform: uppercase; letter-spacing: .1em; }

.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .js .reveal { opacity: 1; transform: none; transition: none; } }

@media (max-width: 850px) {
  .header { grid-template-columns: 1fr auto; }
  .menu-button { display: block; }
  nav { position: absolute; top: 82px; left: 0; right: 0; display: none; flex-direction: column; gap: 0; padding: 14px 24px 20px; border-bottom: 1px solid var(--line); background: rgba(241,239,231,.98); box-shadow: 0 18px 35px rgba(23,25,22,.08); }
  nav.is-open { display: flex; }
  nav a { padding: 13px 0; border-bottom: 1px solid rgba(201,199,189,.65); }
  .hero-main { grid-template-columns: 1fr; padding-top: 90px; }
  .profile-panel { width: min(88vw,410px); justify-self: center; }
  .about-grid, .contact-grid, .work-heading,.skills-heading { grid-template-columns: 1fr; }
  .about-copy, .contact-side { margin-top: 25px; }
  .skill-grid { grid-template-columns: repeat(2,1fr); }
  .project { grid-template-columns: 32px 1fr 42px; }
  .project-visual { grid-column: 2 / 4; grid-row: 1; }
  .project-no { grid-row: 1; }
  .project-info { grid-column: 2; }
  .project-arrow { grid-column: 3; }
}

@media (max-width: 560px) {
  .header { height: 76px; }
  .hero { padding-top: 105px; }
  .hero-meta p:last-child { display: none; }
  h1 { font-size: clamp(3.5rem,17vw,5.2rem); }
  .profile-panel { width: 100%; }
  .about, .skills, .work, .contact { padding-top: 95px; padding-bottom: 100px; }
  .section-label { margin-bottom: 42px; }
  .facts { grid-template-columns: 1fr; }
  .facts div { align-items: center; }
  .skill-grid { grid-template-columns: 1fr; }
  .skill-card { min-height: 220px; }
  .project { grid-template-columns: 24px 1fr; gap: 15px; padding: 26px 0 36px; }
  .project-visual { grid-column: 1 / 3; grid-row: auto; height: 230px; }
  .project-no { grid-row: auto; }
  .project-info { grid-column: 2; }
  .project-arrow { display: none; }
  .contact-card { grid-template-columns: 40px 1fr; }
  .contact-card span { grid-column: 2; text-align: left; }
  .social-list a,.social-entry { grid-template-columns: 32px 1fr auto; }
  .social-list strong { grid-column: 2; }
  .social-list b { grid-column: 3; grid-row: 1 / 3; }
  footer { padding-block: 32px; align-items: flex-start; flex-direction: column; gap: 15px; }
}
