/* SURYA MAKES — WHIMSICAL ENGINEERING WORKSHOP */

/* Theme tokens */
:root {
  color-scheme: light;
  --bg: #F3EDE2;
  --surface: #EAE2D5;
  --surface-strong: #E2D8C9;
  --text: #343A36;
  --text-muted: #77776E;
  --accent: #9D7AC4;
  --accent-soft: #D8C8F0;
  --border: rgba(52, 58, 54, .14);
  --header-bg: rgba(243, 237, 226, .88);
  --shadow: 0 20px 60px rgba(54, 44, 35, .10);
  --robot-body: #B9A2DB;
  --robot-light: #D9C9EF;
  --robot-shadow: #8268A8;
  --robot-face: #F4EBDD;
  --robot-detail: #343A36;
  --orange: #E39A72;
  --green: #A9B99B;
  --font-body: "DM Sans", sans-serif;
  --font-heading: "Space Grotesk", sans-serif;
  --transition: .3s ease;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #292C30;
  --surface: #35383D;
  --surface-strong: #41434A;
  --text: #F3EDE2;
  --text-muted: #B3ADA4;
  --accent: #C5A8E8;
  --accent-soft: #494052;
  --border: rgba(243, 237, 226, .14);
  --header-bg: rgba(41, 44, 48, .90);
  --shadow: 0 20px 60px rgba(0, 0, 0, .24);
  --robot-body: #9278B9;
  --robot-light: #C4A9E6;
  --robot-shadow: #5E4A7C;
  --robot-face: #F3EDE2;
  --robot-detail: #343A36;
  --orange: #E8A27C;
  --green: #A9B99B;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
::selection { background: var(--accent-soft); color: var(--text); }
.container { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.section { padding: 108px 0; }

/* Header and theme toggle */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}
.navbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; }
.logo { font: 700 20px var(--font-heading); letter-spacing: -1px; white-space: nowrap; }
.logo span { font-weight: 400; }
.logo b { color: var(--accent); margin-left: 4px; }
.nav-links { display: flex; gap: 30px; }
.nav-links a { color: var(--text-muted); font-size: 13px; font-weight: 600; transition: color var(--transition); }
.nav-links a:hover { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  width: 43px; height: 43px; border: 1px solid var(--border); border-radius: 50%;
  display: grid; place-items: center; position: relative; cursor: pointer;
  color: var(--text); background: var(--surface); font-size: 21px;
  transition: transform var(--transition), background var(--transition);
}
.theme-toggle:hover { transform: rotate(15deg); }
.sun-icon, .moon-icon { grid-area: 1 / 1; transition: opacity var(--transition), transform var(--transition); }
[data-theme="light"] .sun-icon { opacity: 1; transform: scale(1); }
[data-theme="light"] .moon-icon { opacity: 0; transform: scale(.5); }
[data-theme="dark"] .sun-icon { opacity: 0; transform: scale(.5); }
[data-theme="dark"] .moon-icon { opacity: 1; transform: scale(1); }
.menu-toggle { display: none; border: 0; background: transparent; cursor: pointer; }

/* Hero */
.hero { padding-top: 92px; padding-bottom: 32px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 55px; }
.eyebrow, .section-number, .card-category {
  color: var(--text-muted); font-size: 10px; font-weight: 700; letter-spacing: 1.7px;
}
.eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #8BA78A; box-shadow: 0 0 0 4px rgba(139,167,138,.15); }
.hero h1 { font: 600 clamp(54px, 6.5vw, 82px)/1.04 var(--font-heading); letter-spacing: -5px; }
.highlight { color: var(--accent); }
.period { color: var(--orange); }
.hero-description { max-width: 460px; margin-top: 25px; color: var(--text-muted); font-size: 15px; line-height: 1.9; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 16px;
  padding: 14px 21px; border-radius: 50px; font-size: 13px; font-weight: 700;
  transition: transform var(--transition), background var(--transition), color var(--transition);
}
.button:hover { transform: translateY(-3px); }
.button-primary { background: var(--text); color: var(--bg); }
.button-primary:hover { background: var(--accent); color: #292C30; }
.button-secondary { border: 1px solid var(--border); color: var(--text); }
.button-secondary:hover { background: var(--surface); }
.hero-note { margin-top: 35px; color: var(--text-muted); font-size: 11px; }
.hero-note span { color: var(--accent); margin-right: 7px; }
.hero-bottom { display: flex; align-items: center; gap: 15px; margin-top: 48px; color: var(--text-muted); font-size: 9px; font-weight: 700; letter-spacing: 1.5px; }
.scroll-line { width: 70px; height: 1px; background: var(--border); }

/* Mascot illustration */
.hero-art { min-height: 465px; position: relative; display: grid; place-items: center; }
.mascot-stage {
  width: 410px; height: 410px; position: relative; display: grid; place-items: center;
  border-radius: 50%; background: radial-gradient(circle, var(--surface-strong), transparent 70%);
}
.art-label { position: absolute; left: 0; right: 0; display: flex; justify-content: space-between; color: var(--text-muted); font-size: 9px; letter-spacing: 1.4px; }
.label-top { top: 8px; }
.label-bottom { bottom: 5px; }
.mascot-orbit { position: absolute; border: 1px dashed var(--border); border-radius: 50%; }
.orbit-a { width: 350px; height: 350px; }
.orbit-b { width: 290px; height: 290px; transform: rotateX(65deg) rotate(25deg); }
.robot { position: relative; z-index: 2; width: 190px; height: 285px; animation: robot-float 4s ease-in-out infinite; }
.robot-antenna { position: absolute; top: -19px; left: 91px; width: 7px; height: 28px; border-radius: 5px; background: var(--robot-shadow); }
.robot-antenna span { position: absolute; top: -12px; left: -5px; width: 17px; height: 17px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 15px rgba(227,154,114,.4); }
.robot-head {
  position: absolute; z-index: 3; top: 10px; left: 20px; width: 150px; height: 120px;
  border-radius: 48% 48% 42% 42%; background: linear-gradient(145deg, var(--robot-light), var(--robot-body));
  box-shadow: 0 12px 0 var(--robot-shadow), 0 20px 30px rgba(50,40,60,.14);
}
.robot-face { position: absolute; inset: 13px; border-radius: 44%; background: var(--robot-face); }
.robot-ear { position: absolute; top: 39px; width: 27px; height: 40px; border-radius: 12px; background: var(--robot-shadow); }
.ear-left { left: -18px; transform: rotate(-15deg); }
.ear-right { right: -18px; transform: rotate(15deg); }
.robot-eyes { position: absolute; top: 31px; left: 27px; right: 27px; display: flex; justify-content: space-between; }
.robot-eye { width: 12px; height: 17px; border-radius: 50%; background: var(--robot-detail); }
.robot-cheeks { position: absolute; top: 60px; left: 17px; right: 17px; display: flex; justify-content: space-between; }
.robot-cheeks span { width: 17px; height: 9px; border-radius: 50%; background: #E8A18D; opacity: .85; }
.robot-mouth { position: absolute; bottom: 18px; left: 50%; width: 17px; height: 9px; transform: translateX(-50%); border-bottom: 3px solid var(--robot-detail); border-radius: 50%; }
.robot-neck { position: absolute; top: 125px; left: 80px; width: 30px; height: 20px; background: var(--robot-shadow); }
.robot-body {
  position: absolute; top: 140px; left: 40px; width: 110px; height: 115px; border-radius: 30px 30px 38px 38px;
  background: linear-gradient(145deg, var(--robot-light), var(--robot-body));
  box-shadow: 0 12px 0 var(--robot-shadow), 0 18px 25px rgba(50,40,60,.12);
}
.robot-panel { position: absolute; top: 15px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; padding: 6px 10px; border-radius: 20px; background: var(--robot-face); }
.robot-panel i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.robot-panel i:nth-child(2) { background: var(--orange); }
.robot-belly { position: absolute; top: 48px; left: 33px; width: 45px; height: 45px; display: grid; place-items: center; border-radius: 15px; background: var(--robot-face); color: var(--robot-shadow); font-size: 23px; }
.robot-bolt { position: absolute; top: 42px; width: 7px; height: 7px; border-radius: 50%; background: var(--robot-shadow); }
.bolt-left { left: 10px; } .bolt-right { right: 10px; }
.robot-arm { position: absolute; z-index: -1; top: 155px; width: 27px; height: 75px; border-radius: 20px; background: var(--robot-body); }
.arm-left { left: 20px; transform: rotate(25deg); } .arm-right { right: 20px; transform: rotate(-25deg); }
.robot-hand { position: absolute; bottom: -8px; left: 2px; width: 23px; height: 23px; border-radius: 50%; background: var(--orange); }
.robot-leg { position: absolute; top: 252px; width: 22px; height: 24px; background: var(--robot-shadow); }
.leg-left { left: 60px; } .leg-right { right: 60px; }
.robot-foot { position: absolute; top: 268px; width: 43px; height: 22px; border-radius: 18px 18px 12px 12px; background: var(--orange); }
.foot-left { left: 43px; } .foot-right { right: 43px; }
.floating-star { position: absolute; color: var(--accent); font-size: 25px; animation: twinkle 3s ease-in-out infinite; }
.star-a { top: 45px; left: 50px; } .star-b { top: 120px; right: 30px; color: var(--orange); animation-delay: 1s; }
.star-c { bottom: 65px; left: 45px; font-size: 19px; animation-delay: 2s; }
.floating-note { position: absolute; color: var(--text-muted); font-size: 9px; font-weight: 700; letter-spacing: 1.5px; }
.note-a { top: 85px; right: 0; transform: rotate(8deg); } .note-b { bottom: 85px; left: 0; transform: rotate(-8deg); }
.floating-gear { position: absolute; color: var(--orange); font-size: 35px; }
.gear-one { top: 35px; right: 65px; animation: slow-spin 14s linear infinite; }
.gear-two { bottom: 35px; right: 65px; color: var(--accent); font-size: 24px; animation: slow-spin 18s linear infinite reverse; }
.tiny-planet { position: absolute; right: 20px; bottom: 90px; width: 25px; height: 25px; border-radius: 50%; background: var(--green); }
.tiny-planet span { position: absolute; top: 6px; left: -7px; width: 39px; height: 12px; border: 2px solid var(--text-muted); border-radius: 50%; transform: rotate(-30deg); }

/* About */
.about-section { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.about-grid, .workshop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 85px; }
.section-heading h2, .workshop-content h2 { margin-top: 18px; font: 600 clamp(36px, 4vw, 52px)/1.15 var(--font-heading); letter-spacing: -2px; }
.about-content p { margin-bottom: 18px; color: var(--text-muted); font-size: 14px; line-height: 1.9; }
.about-content .large-text { margin-bottom: 22px; color: var(--text); font: 25px/1.5 var(--font-heading); }
.about-signature { display: flex; justify-content: space-between; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 12px; }
.about-signature b { color: var(--accent); font-size: 22px; }

/* Creations */
.creations-section, .workshop-section { background: var(--surface); transition: background var(--transition); }
.section-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 45px; }
.section-heading-row > p { max-width: 250px; color: var(--text-muted); font-size: 13px; line-height: 1.8; }
.creation-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.creation-card { overflow: hidden; border-radius: 22px; background: var(--bg); transition: transform var(--transition), box-shadow var(--transition); }
.creation-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); }
.creation-art { height: 235px; position: relative; display: grid; place-items: center; overflow: hidden; }
.character-art { background: #D8C8F0; } .prototype-art { background: #E8C3A6; } .digital-art { background: #C6D0BA; }
.art-caption { position: absolute; bottom: 14px; left: 17px; color: rgba(52,58,54,.68); font-size: 9px; font-weight: 700; letter-spacing: 1.4px; }
.creation-info { position: relative; padding: 24px; }
.creation-info h3 { margin: 11px 0 7px; font: 600 23px var(--font-heading); }
.creation-info p { max-width: 255px; color: var(--text-muted); font-size: 12px; line-height: 1.8; }
.card-arrow { position: absolute; top: 22px; right: 23px; color: var(--accent); font-size: 20px; }

/* Card illustrations */
.mini-creature { position: relative; width: 120px; height: 115px; border-radius: 48% 48% 40% 40%; background: #9275B8; box-shadow: 12px 18px 20px rgba(52,58,54,.18); transform: rotate(-8deg); }
.creature-face { position: absolute; inset: 13px; border-radius: 45%; background: #F3EDE2; }
.creature-face > span { position: absolute; top: 32px; width: 10px; height: 15px; border-radius: 50%; background: #343A36; }
.creature-face > span:first-child { left: 25px; } .creature-face > span:nth-child(2) { right: 25px; }
.creature-smile { position: absolute; bottom: 19px; left: 42px; width: 12px; height: 8px; border-bottom: 2px solid #343A36; border-radius: 50%; }
.creature-horn { position: absolute; top: -22px; width: 28px; height: 34px; border-radius: 50% 50% 0 0; background: #9275B8; }
.horn-left { left: 15px; transform: rotate(-25deg); } .horn-right { right: 15px; transform: rotate(25deg); }
.doodle { position: absolute; top: 42px; right: 38px; color: #5D536B; font-size: 31px; }
.mini-machine { position: relative; width: 120px; height: 140px; }
.machine-core { position: absolute; top: 35px; left: 23px; width: 75px; height: 75px; border: 7px solid #967052; border-radius: 25px; background: linear-gradient(145deg,#F3D6AD,#B66E4D); transform: rotate(45deg); }
.machine-top { position: absolute; top: 8px; left: 45px; width: 30px; height: 40px; border-radius: 10px 10px 0 0; background: #967052; }
.machine-base { position: absolute; bottom: 5px; left: 5px; width: 110px; height: 18px; border-radius: 50%; background: #967052; }
.machine-lever { position: absolute; top: 0; right: 3px; width: 7px; height: 48px; background: #967052; transform: rotate(35deg); }
.machine-lever::after { content: ""; position: absolute; top: -7px; left: -5px; width: 17px; height: 17px; border-radius: 50%; background: var(--accent); }
.mini-portal { width: 125px; height: 125px; display: grid; place-items: center; position: relative; border: 12px solid #809578; border-radius: 50%; background: #E7E8D9; box-shadow: 10px 15px 20px rgba(52,58,54,.18); transform: rotate(-20deg); }
.portal-inner { width: 65px; height: 65px; border-radius: 50%; background: radial-gradient(circle,#F3EDE2,#9D7AC4); }
.mini-portal > span { position: absolute; color: #343A36; font: 700 30px var(--font-heading); }

/* Engineering projects */
.project-placeholder { position: relative; display: flex; align-items: center; gap: 32px; overflow: hidden; margin-top: 42px; padding: 45px; border: 1px solid var(--border); border-radius: 22px; background: linear-gradient(120deg,var(--surface),transparent); }
.project-symbol { flex: 0 0 82px; width: 82px; height: 82px; display: grid; place-items: center; border-radius: 24px; background: var(--accent-soft); font-size: 40px; }
.project-placeholder h3 { margin-top: 10px; font: 600 24px var(--font-heading); }
.project-placeholder p { max-width: 570px; margin-top: 9px; color: var(--text-muted); font-size: 13px; line-height: 1.9; }
.project-decoration { position: absolute; right: -10px; bottom: 10px; color: var(--text-muted); font-size: 9px; letter-spacing: 2px; transform: rotate(-90deg) translateX(100%); transform-origin: right bottom; }

/* Workshop sketch */
.workshop-content p { max-width: 420px; margin-top: 23px; color: var(--text-muted); font-size: 14px; line-height: 1.9; }
.workshop-note { display: inline-block; margin-top: 27px; font-size: 12px; font-weight: 600; }
.workshop-note b { margin-right: 7px; color: var(--accent); }
.workshop-art { position: relative; min-height: 350px; display: grid; place-items: center; }
.workshop-paper { width: 260px; height: 320px; padding: 22px; color: #343A36; background: #F3EDE2; box-shadow: 20px 20px 50px rgba(0,0,0,.13); transform: rotate(-7deg); }
.paper-label, .paper-footer { font-size: 9px; letter-spacing: 2px; }
.paper-sketch { position: relative; height: 225px; margin-top: 15px; border: 1px dashed #B6AA98; }
.sketch-circle { position: absolute; top: 55px; left: 60px; width: 100px; height: 100px; border: 2px solid #9D7AC4; border-radius: 50%; }
.sketch-line { position: absolute; height: 1px; background: #D98C65; transform-origin: left; }
.line-one { top: 75px; left: 10px; width: 110px; transform: rotate(25deg); }
.line-two { top: 165px; left: 95px; width: 110px; transform: rotate(-35deg); }
.line-three { top: 115px; left: 35px; width: 130px; transform: rotate(-10deg); }
.paper-footer { display: block; margin-top: 12px; }
.workshop-sticker { position: absolute; right: 2px; bottom: 15px; padding: 20px; border-radius: 50%; background: #D98C65; color: #343A36; font-size: 12px; font-weight: 700; line-height: 1.4; text-align: center; transform: rotate(12deg); }

/* Contact and footer */
.contact-section { position: relative; overflow: hidden; text-align: center; }
.contact-content { position: relative; }
.contact-content h2 { margin-top: 23px; font: 600 clamp(40px,5vw,62px)/1.15 var(--font-heading); letter-spacing: -3px; }
.contact-content h2 span { color: var(--accent); }
.contact-content p { max-width: 430px; margin: 20px auto 28px; color: var(--text-muted); font-size: 14px; }
.contact-decoration { position: absolute; top: 12px; right: 10%; color: var(--accent); font-size: 55px; }
.site-footer { padding: 28px 0; border-top: 1px solid var(--border); }
.footer-content { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-content p, .footer-content > span { color: var(--text-muted); font-size: 11px; }

/* Motion */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .75s ease, transform .75s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@keyframes robot-float { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-13px) rotate(2deg); } }
@keyframes twinkle { 0%,100% { transform: scale(1) rotate(0); opacity: .7; } 50% { transform: scale(1.25) rotate(15deg); opacity: 1; } }
@keyframes slow-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { gap: 20px; }
  .mascot-stage { transform: scale(.88); }
  .creation-grid { grid-template-columns: repeat(2,1fr); }
  .creation-card:last-child { grid-column: span 2; }
  .about-grid, .workshop-grid { gap: 45px; }
}
@media (max-width: 680px) {
  .container { width: min(100% - 36px, 500px); }
  .section { padding: 75px 0; }
  .navbar { min-height: 70px; }
  .nav-links {
    position: absolute; top: 70px; left: 0; right: 0; display: none;
    flex-direction: column; gap: 20px; padding: 24px;
    background: var(--bg); border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 15px; }
  .menu-toggle { width: 35px; height: 35px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
  .menu-toggle span { display: block; width: 21px; height: 2px; background: var(--text); }
  .hero { padding-top: 65px; }
  .hero-grid, .about-grid, .workshop-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(50px,13vw,70px); letter-spacing: -3px; }
  .hero-art { min-height: 390px; }
  .mascot-stage { transform: scale(.82); }
  .hero-bottom { margin-top: 25px; }
  .section-heading-row { display: block; }
  .section-heading-row > p { margin-top: 16px; }
  .creation-grid { grid-template-columns: 1fr; }
  .creation-card:last-child { grid-column: auto; }
  .project-placeholder { align-items: flex-start; flex-direction: column; padding: 28px; }
  .project-decoration { display: none; }
  .workshop-art { min-height: 340px; }
  .contact-content h2 { font-size: 42px; letter-spacing: -2px; }
  .contact-decoration { top: -35px; right: 0; font-size: 35px; }
  .footer-content { flex-direction: column; text-align: center; }
}
@media (max-width: 390px) {
  .mascot-stage { transform: scale(.72); }
  .hero-art { min-height: 350px; }
  .hero-buttons .button { padding: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
