
/* Raf Portfolio — all visuals are CSS-generated; no external assets required. */
:root {
  color-scheme: light;
  --bg: #f7f8f3;
  --surface: #ffffff;
  --surface-soft: #eff1e9;
  --text: #14241e;
  --muted: #4d6056;
  --line: #d7ded5;
  --accent: #d4f78c;
  --dark: #142b23;
  --on-dark: #f7fbf3;
  --shadow: 0 22px 60px rgb(13 34 24 / 9%);
  --radius: 20px;
  --container: 1180px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111c17;
  --surface: #1a2921;
  --surface-soft: #22352a;
  --text: #f4f7ed;
  --muted: #bed0c1;
  --line: #405449;
  --accent: #d4f78c;
  --dark: #0b1610;
  --on-dark: #f7fbf3;
  --shadow: 0 22px 60px rgb(0 0 0 / 22%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 95px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #8cbd36; outline-offset: 4px; }
::selection { background: var(--accent); color: #14241e; }
.container { width: min(var(--container), calc(100% - 48px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; transform: translateY(-170%); background: var(--accent); color: #14241e; border-radius: 10px; padding: 9px 14px; text-decoration: none; font-weight: 700; }
.skip-link:focus { transform: translateY(0); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(16px)) { .site-header { background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(16px); } }
.header-inner { height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { font-size: 2rem; line-height: 1; font-weight: 850; letter-spacing: -.105em; text-decoration: none; white-space: nowrap; padding-right: .15em; }
.wordmark span { color: #77a92e; }
.site-nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 38px); }
.site-nav a { text-decoration: none; font-size: .91rem; font-weight: 650; transition: color .2s; }
.site-nav a:hover, .back-top:hover { color: #6b9f29; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 50%; cursor: pointer; }
.icon-button:hover { background: var(--surface-soft); }
.theme-toggle svg { width: 19px; height: 19px; }
.menu-toggle { display: none; }

/* Type and shared components */
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 26px; font-size: .72rem; line-height: 1.4; font-weight: 800; letter-spacing: .17em; }
.status-dot { width: 9px; height: 9px; background: #79b334; border-radius: 50%; box-shadow: 0 0 0 4px rgb(121 179 52 / 14%); }
h1, h2, h3, p { overflow-wrap: break-word; }
h1, h2 { margin: 0; font-weight: 760; letter-spacing: -.075em; line-height: 1.03; }
h1 { font-size: clamp(4rem, 8.3vw, 7.4rem); }
h2 { font-size: clamp(3rem, 6vw, 5.5rem); }
h1 em, h2 em { font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.065em; }
.section-pad { padding-block: clamp(74px, 10vw, 136px); }
.section-header { display: flex; justify-content: space-between; align-items: end; gap: 36px; margin-bottom: 50px; }
.section-header .eyebrow { margin-bottom: 22px; }
.section-intro { color: var(--muted); max-width: 315px; margin: 0 0 7px; line-height: 1.75; }
.button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 32px; padding: 13px 21px; border: 1px solid transparent; border-radius: 100px; text-decoration: none; font-size: .91rem; font-weight: 750; transition: transform .2s, background .2s; }
.button span, .text-link span { font-size: 1.18em; }
.button:hover { transform: translateY(-3px); }
.button-primary { background: var(--text); color: var(--bg); }
.button-primary:hover { background: #426b4c; color: #fff; }
.text-link { display: inline-flex; align-items: center; gap: 14px; font-size: .9rem; font-weight: 760; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.text-link:hover { color: #668e27; }

/* Hero */
.hero { min-height: 680px; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(35px, 6vw, 86px); padding-block: 84px 100px; }
.hero-copy { min-width: 0; }
.hero-description { max-width: 465px; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.16rem); line-height: 1.75; margin: 28px 0 31px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 26px; }
.hero-index { display: flex; gap: 23px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 82px; padding-top: 21px; color: var(--muted); font-size: .72rem; font-weight: 760; letter-spacing: .05em; }
.hero-art { position: relative; height: min(510px, 44vw); min-height: 370px; background: #d9e4cd; border-radius: 24px; overflow: hidden; isolation: isolate; }
.art-grid { position: absolute; inset: 0; opacity: .4; background-image: linear-gradient(#78907a 1px, transparent 1px), linear-gradient(90deg, #78907a 1px, transparent 1px); background-size: 39px 39px; mask-image: linear-gradient(to bottom, black, transparent 85%); }
.art-ring { position: absolute; border: 1px solid #9bb298; border-radius: 50%; aspect-ratio: 1; }
.art-ring-one { width: 94%; top: -28%; left: 32%; }
.art-ring-two { width: 70%; bottom: -39%; left: -34%; }
.hero-art-card { position: absolute; width: 68%; aspect-ratio: .76; max-height: 80%; left: 15%; top: 11%; background: #18392c; color: #f1f8df; border-radius: 15px; transform: rotate(-7deg); box-shadow: 15px 25px 45px rgb(17 42 28 / 25%); padding: 24px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.hero-art-card::before { content: ""; position: absolute; width: 100%; height: 100%; inset: 0; background: radial-gradient(circle at 85% 60%, rgb(204 255 122 / 12%), transparent 45%); }
.art-card-top, .art-card-bottom { display: flex; justify-content: space-between; gap: 10px; position: relative; z-index: 1; }
.art-card-top { font-size: clamp(.46rem, .85vw, .62rem); font-weight: 700; letter-spacing: .1em; }
.art-symbol { font-size: clamp(8rem, 19vw, 16.5rem); align-self: center; font-weight: 800; line-height: 1; letter-spacing: -.12em; position: relative; padding-right: .1em; }
.art-symbol span { position: absolute; font-size: .3em; color: #d2f482; right: -.22em; top: .05em; }
.art-card-bottom { font-size: clamp(.85rem, 1.5vw, 1.2rem); line-height: 1.23; font-weight: 700; }
.art-card-bottom span:last-child { font-size: 1.8rem; }
.art-sticker { position: absolute; z-index: 2; bottom: 18%; right: -19%; background: #d5f68d; color: #193828; padding: 11px 70px; font-size: .58rem; font-weight: 850; letter-spacing: .11em; transform: rotate(-35deg); box-shadow: 0 6px 20px rgb(0 0 0 / 8%); }
.art-sticker span { margin-left: 10px; }
.art-caption { position: absolute; bottom: 20px; left: 24px; color: #45644d; font-size: .62rem; font-weight: 750; letter-spacing: .11em; }

/* Work */
.work-section { background: var(--surface); }
.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 30px; }
.filter-button { padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text); font-size: .85rem; font-weight: 700; cursor: pointer; }
.filter-button span { margin-left: 10px; font-size: .75rem; opacity: .68; }
.filter-button:hover { background: var(--surface-soft); }
.filter-button.is-active { background: var(--text); color: var(--surface); border-color: var(--text); }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 26px; }
.project-card { min-width: 0; }
.project-card[hidden] { display: none; }
.project-card:nth-child(3) { grid-column: 1 / 2; }
.project-visual { width: 100%; min-width: 0; min-height: 300px; aspect-ratio: 1.28; border-radius: var(--radius); position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; }
.visual-development { background: #dcebe1; }
.visual-number { position: absolute; left: 21px; bottom: 17px; color: rgb(0 0 0 / 55%); font: 700 .7rem/1 system-ui, sans-serif; letter-spacing: .1em; }
.dashboard-demo { width: 75%; height: 67%; background: #f8faf7; border: 1px solid #bfcdc2; border-radius: 11px; box-shadow: 14px 17px 0 rgb(43 98 73 / 11%), 0 18px 36px rgb(28 72 47 / 15%); transform: rotate(-6deg); overflow: hidden; }
.dashboard-top { height: 23%; display: flex; justify-content: space-between; align-items: center; padding-inline: 6%; border-bottom: 1px solid #d9e3da; color: #41614e; font-size: clamp(.42rem, .9vw, .64rem); font-weight: 800; letter-spacing: .1em; }
.demo-dots { color: #89b993; letter-spacing: .3em; }
.demo-body { height: 77%; display: grid; grid-template-columns: 23% 1fr; }
.demo-sidebar { background: #e4ece3; padding: 24% 15%; display: flex; flex-direction: column; gap: 16%; }
.demo-sidebar i { height: 7px; border-radius: 20px; background: #bbd1c0; }
.demo-sidebar i:first-child { background: #387a4d; }
.demo-main { padding: 8% 9%; min-width: 0; }
.demo-main b { display: block; color: #224832; font-size: clamp(.8rem, 1.4vw, 1.2rem); margin-bottom: 12%; }
.demo-bars { display: flex; align-items: end; height: 42%; gap: 6%; border-bottom: 1px solid #c6d6c9; }
.demo-bars i { flex: 1; background: #90b7a0; border-radius: 3px 3px 0 0; }
.demo-bars i:nth-child(1) { height: 40%; }.demo-bars i:nth-child(2) { height: 70%; }.demo-bars i:nth-child(3) { height: 56%; }.demo-bars i:nth-child(4) { height: 88%; background: #2f7150; }.demo-bars i:nth-child(5) { height: 75%; }
.demo-tiles { display: flex; gap: 7%; margin-top: 7%; height: 18%; }
.demo-tiles i { flex: 1; background: #e1e9dd; border-radius: 4px; }
.visual-design { background: #ead5bc; }
.brand-circle { position: absolute; width: 65%; aspect-ratio: 1; border-radius: 50%; background: #d36b51; top: 11%; left: 12%; }
.brand-circle::after { content: ""; position: absolute; width: 100%; height: 100%; border: 1px solid rgb(255 255 255 / 60%); border-radius: 50%; transform: translate(21%, 13%); }
.brand-letter { position: relative; color: #fff2de; font: 700 clamp(11rem, 25vw, 19rem)/1 Georgia, serif; letter-spacing: -.15em; transform: translate(-5%, -4%) rotate(-8deg); }
.brand-letter span { color: #523b32; }
.brand-label { position: absolute; right: 22px; top: 20px; color: #5b3d34; font-size: .62rem; font-weight: 800; letter-spacing: .12em; }
.visual-experiment { background: #302947; color: #eddbff; }
.orbit { position: absolute; border: 1px solid rgb(229 211 255 / 46%); border-radius: 50%; width: 67%; aspect-ratio: 1; transform: rotate(-25deg) scaleY(.55); }
.orbit-outer::after { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; background: #ffc78f; left: 5%; top: 28%; box-shadow: 0 0 0 8px rgb(255 199 143 / 13%); }
.orbit-inner { width: 48%; transform: rotate(45deg) scaleY(.7); border-color: rgb(229 211 255 / 70%); }
.orbit-core { font-size: clamp(7rem, 16vw, 12rem); color: #c7ef93; line-height: 1; filter: drop-shadow(0 0 35px rgb(199 239 147 / 30%)); }
.experiment-label { position: absolute; top: 21px; right: 22px; color: #e3d4f3; font-size: .62rem; font-weight: 800; letter-spacing: .12em; }
.visual-experiment .visual-number { color: #d8cbe4; }
.project-info { padding: 22px 2px 0; }
.project-topline { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .67rem; font-weight: 850; letter-spacing: .12em; color: var(--muted); }
.project-topline span:last-child { opacity: .7; }
.project-info h3 { margin: 13px 0 6px; font-size: clamp(1.5rem, 2.4vw, 1.9rem); letter-spacing: -.04em; line-height: 1.2; }
.project-info > p { max-width: 440px; color: var(--muted); margin: 0 0 18px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tags span { padding: 5px 10px; background: var(--surface-soft); color: var(--muted); border: 1px solid var(--line); border-radius: 99px; font-size: .72rem; font-weight: 700; }
.project-details { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.project-details summary { cursor: pointer; font-size: .86rem; font-weight: 750; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.project-details summary::-webkit-details-marker { display: none; }
.project-details summary span { transition: transform .2s; }
.project-details[open] summary span { transform: rotate(45deg); }
.project-details p { color: var(--muted); font-size: .91rem; margin: 12px 0 0; }

/* About */
.about-section { border-bottom: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(40px, 8vw, 120px); }
.about-monogram { font-size: clamp(13rem, 27vw, 26rem); font-weight: 850; line-height: .98; letter-spacing: -.14em; color: var(--surface-soft); user-select: none; }
.about-monogram span { color: #a6d663; }
.about-content h2 { margin-bottom: 36px; }
.about-content p { max-width: 530px; color: var(--muted); font-size: 1rem; line-height: 1.85; }
.about-content .lead { font-size: clamp(1.24rem, 2.3vw, 1.65rem); font-weight: 650; color: var(--text); line-height: 1.5; }
.about-content .placeholder-note { font-size: .83rem; border-left: 3px solid #93bb54; padding-left: 13px; margin: 25px 0 32px; }

/* Principles */
.approach-section { background: var(--surface-soft); }
.section-header-compact { margin-bottom: 45px; }
.principles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.principle { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 29px; min-height: 290px; display: flex; flex-direction: column; align-items: start; }
.principle-number { color: var(--muted); font-size: .78rem; font-weight: 800; letter-spacing: .12em; }
.principle-icon { font-size: 3.8rem; line-height: 1; margin: 26px 0 28px; color: #76a538; }
.principle h3 { font-size: 1.3rem; letter-spacing: -.035em; line-height: 1.25; margin: 0 0 9px; }
.principle p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.7; }

/* Contact */
.contact-section { background: var(--surface); }
.contact-panel { position: relative; overflow: hidden; isolation: isolate; background: #173a2c; color: #f4f9ed; min-height: 495px; padding: clamp(28px, 6.5vw, 78px); border-radius: 25px; }
.contact-topline { display: flex; justify-content: space-between; gap: 15px; flex-wrap: wrap; margin-bottom: 60px; font-size: .7rem; font-weight: 850; letter-spacing: .15em; }
.contact-panel h2 { position: relative; z-index: 1; font-size: clamp(3.2rem, 7.3vw, 6.9rem); max-width: 850px; }
.contact-panel h2 em { color: var(--accent); }
.contact-panel > p:not(.contact-note) { position: relative; z-index: 1; max-width: 450px; line-height: 1.7; color: #d7e7d6; }
.button-light { position: relative; z-index: 1; background: var(--accent); color: #183329; margin-top: 14px; }
.button-light:hover { background: #edfcb9; }
.contact-note { position: relative; z-index: 1; color: #d7e7d6; font-size: .76rem; margin: 12px 0 0; }
.contact-decoration { position: absolute; right: -3%; bottom: -44%; font-size: clamp(19rem, 43vw, 40rem); line-height: 1; color: rgb(212 247 140 / 11%); pointer-events: none; }

/* Footer */
.footer-inner { padding-block: 28px; display: flex; align-items: center; gap: 30px; justify-content: space-between; }
.footer-inner .wordmark { font-size: 1.65rem; }
.footer-inner p { color: var(--muted); font-size: .79rem; margin: 0; }
.back-top { font-size: .82rem; font-weight: 750; text-decoration: none; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr 1fr; min-height: 580px; gap: 28px; }
  .hero-index { margin-top: 48px; }
  .hero-art { min-height: 335px; }
  .hero-art-card { width: 76%; left: 11%; padding: 16px; }
  .art-sticker { right: -34%; }
  .about-grid { gap: 40px; }
  .principle { padding: 22px; }
}

@media (max-width: 720px) {
  html { scroll-padding-top: 78px; }
  .container { width: min(var(--container), calc(100% - 36px)); }
  .header-inner { height: 72px; }
  .menu-toggle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
  .menu-toggle span { display: block; width: 17px; height: 2px; border-radius: 2px; background: currentColor; }
  .site-nav { display: none; position: absolute; top: 71px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 14px 18px 23px; flex-direction: column; align-items: stretch; gap: 0; box-shadow: var(--shadow); }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 13px max(3px, calc((100vw - var(--container)) / 2)); font-size: 1rem; }
  .hero { grid-template-columns: 1fr; padding-block: 67px 79px; gap: 55px; }
  .hero-art { height: 410px; min-height: 0; }
  .hero-art-card { width: min(64%, 300px); }
  .art-symbol { font-size: 13rem; }
  .hero-index { margin-top: 45px; }
  .section-header { align-items: start; flex-direction: column; gap: 20px; margin-bottom: 34px; }
  .section-intro { max-width: 560px; }
  .project-grid { grid-template-columns: 1fr; gap: 44px; }
  .project-card:nth-child(3) { grid-column: auto; }
  .project-visual { max-height: 500px; }
  .brand-letter { font-size: clamp(11rem, 46vw, 19rem); }
  .about-grid { grid-template-columns: 1fr; gap: 10px; }
  .about-side { display: flex; align-items: center; justify-content: space-between; }
  .about-monogram { font-size: 10rem; line-height: .65; }
  .principles-grid { grid-template-columns: 1fr; }
  .principle { min-height: 210px; }
  .principle-icon { margin: 14px 0 20px; }
  .contact-topline { margin-bottom: 60px; }
  .contact-panel { min-height: 490px; }
}

@media (max-width: 440px) {
  h1 { font-size: clamp(3.7rem, 17vw, 5.2rem); }
  h2 { font-size: clamp(2.8rem, 12vw, 3.8rem); }
  .hero-actions { align-items: start; gap: 22px; }
  .hero-index { gap: 10px 18px; }
  .hero-art { height: 340px; }
  .hero-art-card { width: 68%; }
  .art-symbol { font-size: 10rem; }
  .art-sticker { right: -38%; }
  .project-visual { min-height: 255px; }
  .dashboard-demo { width: 80%; }
  .contact-panel h2 { font-size: clamp(2.6rem, 13vw, 4.4rem); }
  .footer-inner { flex-wrap: wrap; gap: 14px 26px; }
  .footer-inner p { order: 3; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
