/* ==========================================================
   HeddleByte Web Studio — freelance developer portfolio
   Clean, light, professional. Forest green + warm orange.
   ========================================================== */

:root {
  --bg:        #FAFAF8;
  --bg-alt:    #F3F5F1;
  --surface:   #FFFFFF;
  --ink:       #14211B;
  --muted:     #65736B;
  --green:     #146B4A;
  --green-2:   #0E5A3D;
  --green-soft:#E7F3EC;
  --orange:    #E8703A;
  --orange-soft:#FDF0E8;
  --line:      #E2E8E3;
  --radius:    14px;
  --shadow:    0 12px 34px rgba(20,33,27,.07);
  --container: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }
.container { width: min(var(--container), calc(100% - 48px)); margin-inline: auto; }
.section { padding: 112px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--green); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 12px; }

/* ---------- Type ---------- */
h1, h2, h3 { margin: 0 0 18px; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; }
h1 { font-size: clamp(44px, 5.6vw, 72px); }
h2 { font-size: clamp(34px, 4.2vw, 54px); }
h3 { font-size: 22px; line-height: 1.2; }
.accent { color: var(--green); }
.eyebrow, .nav-links a, .status, .num, .project-tag, .project-link,
.filter-btn, .step-num, .field label, .footer-links span, .footer-bottom, .modal-label {
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
.eyebrow { display: block; margin-bottom: 16px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: 2.5px; text-transform: uppercase; }
.lead { font-size: 18px; color: var(--muted); max-width: 620px; margin: 0 0 30px; }
.section-head { display: grid; grid-template-columns: 1.6fr .7fr; gap: 48px; align-items: end; margin-bottom: 50px; }
.section-head h2 { margin-bottom: 0; }
.section-intro { color: var(--muted); font-size: 15px; margin: 0; border-left: 3px solid var(--orange); padding-left: 18px; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250,250,248,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; }
.brand-mark img { width: 40px; height: 40px; border-radius: 10px; }
.brand-text { font-size: 17px; font-weight: 800; letter-spacing: -.03em; }
.brand-text span { color: var(--green); font-weight: 600; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); padding: 6px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--green); border-color: var(--orange); }
.nav-toggle { display: none; margin-left: auto; padding: 8px; border: 0; background: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { width: 24px; height: 2px; border-radius: 2px; background: var(--ink); transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 24px; border-radius: 10px; font-weight: 700; font-size: 14px; border: 1px solid transparent; cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s, background .2s; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 9px 16px; font-size: 12px; }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 8px 20px rgba(20,107,74,.18); }
.btn-primary:hover { background: var(--green-2); box-shadow: 0 12px 26px rgba(20,107,74,.26); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }

/* ---------- Hero ---------- */
.hero { padding: 106px 0 90px; background: linear-gradient(180deg, var(--green-soft), var(--bg) 65%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.status { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 24px; padding: 7px 13px; border: 1px solid rgba(20,107,74,.2); border-radius: 999px; background: rgba(255,255,255,.7); color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(20,107,74,.12); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-visual { position: relative; }
.editor { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.editor-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #F7F9F7; border-bottom: 1px solid var(--line); font: 12px ui-monospace, Consolas, monospace; color: var(--muted); }
.editor-dots { display: flex; gap: 6px; }
.editor-dots i { width: 9px; height: 9px; border-radius: 50%; background: #D5DED8; }
.editor-dots i:first-child { background: var(--orange); }
.editor-dots i:nth-child(2) { background: #C8D6CB; }
.editor-body { padding: 22px 20px; font: 13px/1.95 ui-monospace, "SFMono-Regular", Consolas, monospace; color: var(--muted); }
.line .n { display: inline-block; width: 26px; color: #B7C4BB; user-select: none; }
.k { color: var(--orange); font-weight: 700; } .v { color: var(--ink); font-weight: 700; }
.s { color: var(--green); } .t { color: #B45309; }
.cursor { display: inline-block; width: 7px; height: 15px; background: var(--green); vertical-align: -3px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.editor-status { display: flex; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--line); background: #F7F9F7; font: 11px ui-monospace, Consolas, monospace; color: var(--muted); }
.editor-status i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--green); }
.hero-note { position: absolute; right: -14px; bottom: -22px; display: flex; flex-direction: column; padding: 13px 18px; border-radius: 10px; background: var(--ink); color: #fff; box-shadow: 0 14px 30px rgba(20,33,27,.2); }
.hero-note strong { font-size: 13px; }
.hero-note span { color: #A9C4B5; font-size: 11px; }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.service-card { padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .2s, box-shadow .2s, border-color .2s; }
.service-card:hover { transform: translateY(-4px); border-color: rgba(20,107,74,.35); box-shadow: var(--shadow); }
.service-top { display: flex; align-items: start; justify-content: space-between; margin-bottom: 24px; }
.num { color: var(--orange); font-size: 14px; font-weight: 800; letter-spacing: 2px; }
.icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 12px; background: var(--green-soft); }
.icon svg { width: 26px; height: 26px; fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.service-card h3 { margin-bottom: 10px; }
.service-card p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Work ---------- */
.portfolio-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.filter-btn { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; transition: color .2s, background .2s, border-color .2s; }
.filter-btn:hover { color: var(--green); border-color: var(--green); }
.filter-btn.active { background: var(--green); border-color: var(--green); color: #fff; }
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project-card { cursor: pointer; }
.project-card.filtered-out { display: none; }
.project-visual { height: 190px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: var(--green-soft); }
.project-visual img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.project-card:hover .project-visual img { transform: scale(1.05); }
.project-card:hover .project-visual { border-color: rgba(20,107,74,.4); }
.project-body { padding-top: 18px; }
.project-tag { display: block; margin-bottom: 8px; color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; }
.project-body h3 { font-size: 20px; margin-bottom: 8px; }
.project-body p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.project-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.project-link { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
button.project-link { background: none; border: 0; padding: 0; cursor: pointer; }
.project-link-sub { color: var(--muted); }
.project-link span { display: inline-block; transition: transform .2s; }
.project-link:hover span { transform: translateX(4px); }

/* Simple CSS mock visuals */
.mock-app, .mock-booking { background: linear-gradient(135deg, #E7F3EC, #FDF0E8); }
.mock-software, .mock-web { background: linear-gradient(135deg, #EAF2EC, #F6F8F4); }
.mock-update { background: linear-gradient(135deg, #FDF0E8, #F3F5F1); }
.phone { width: 78px; height: 140px; padding: 10px 7px; border: 2px solid var(--green); border-radius: 13px; background: #fff; box-shadow: 0 8px 18px rgba(20,33,27,.1); }
.phone span { display: block; height: 12px; margin-bottom: 9px; border-radius: 5px; background: var(--green-soft); }
.phone span:first-child { background: var(--green); }
.phone span:last-child { background: var(--orange-soft); }
.window { width: 76%; border: 1px solid #BFCFC3; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 8px 18px rgba(20,33,27,.08); }
.window-bar { display: flex; gap: 5px; padding: 7px; background: #F3F6F3; border-bottom: 1px solid var(--line); }
.window-bar i { width: 6px; height: 6px; border-radius: 50%; background: #C6D2C9; }
.window-bar i:first-child { background: var(--orange); }
.window > span { display: block; height: 9px; margin: 12px 12px 0; border-radius: 4px; background: var(--green-soft); }
.window > span:last-child { width: 60%; margin-bottom: 14px; background: var(--orange-soft); }
.dashboard { display: flex; gap: 10px; width: 76%; height: 58%; }
.panel { flex: 1; border: 1px solid #BFCFC3; border-radius: 8px; background: #fff; }
.bars { display: flex; align-items: end; gap: 6px; width: 38%; }
.bars i { flex: 1; border-radius: 3px 3px 0 0; background: var(--green); }
.bars i:nth-child(1) { height: 38%; opacity: .6; }
.bars i:nth-child(2) { height: 65%; }
.bars i:nth-child(3) { height: 45%; background: var(--orange); }
.bars i:nth-child(4) { height: 88%; }
.split { display: flex; align-items: center; gap: 12px; }
.split span { width: 62px; height: 84px; border-radius: 8px; border: 1px solid #BFCFC3; background: #fff; }
.split span:last-child { background: var(--green-soft); border-color: var(--green); }
.split b { color: var(--orange); font-size: 22px; }

/* ---------- Process ---------- */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step { padding: 28px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.step-num { display: block; margin-bottom: 16px; color: var(--orange); font-size: 16px; font-weight: 800; letter-spacing: 2px; }
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: start; }
.about-copy p { color: var(--muted); font-size: 17px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--green); font-weight: 800; border-bottom: 2px solid var(--orange); padding-bottom: 2px; }
.text-link span { transition: transform .2s; }
.text-link:hover span { transform: translateX(5px); }
.about-panel { padding: 34px; background: var(--green); color: #fff; border-radius: var(--radius); box-shadow: 0 18px 40px rgba(20,107,74,.18); }
.about-panel h3 { color: #fff; }
.check-list { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 13px; }
.check-list li { position: relative; padding-left: 28px; color: rgba(255,255,255,.9); }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: #FFD2B8; font-weight: 800; }
.about-note { display: flex; gap: 12px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.25); }
.quote-mark { color: #FFD2B8; font: 800 38px/1 Georgia, serif; }
.about-note p { margin: 0; font-style: italic; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contact-details h2 { margin-bottom: 20px; }
.contact-list { display: grid; margin-top: 34px; border-top: 1px solid var(--line); }
.contact-item { display: flex; align-items: center; gap: 15px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.contact-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 10px; background: var(--green-soft); }
.contact-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-item strong { display: block; font-size: 16px; }
.contact-item strong a:hover { color: var(--green); }
.contact-item small { display: block; color: var(--muted); font-size: 13px; }
.contact-form { padding: 34px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 7px; font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink); }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; color: var(--ink); background: #FBFDFB; border: 1px solid var(--line); border-radius: 9px; outline: none; transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: #A9B5AC; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(20,107,74,.1); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--orange); }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 14px 0 0; min-height: 22px; font-size: 14px; font-weight: 700; }
.form-status.success { color: var(--green); }
.form-status.error { color: var(--orange); }

/* ---------- Back to top ---------- */
.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 60; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: var(--green); color: #fff; font-size: 19px; font-weight: 800; box-shadow: 0 10px 24px rgba(20,107,74,.25); opacity: 0; visibility: hidden; transform: translateY(12px); transition: .25s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--orange); }

/* ---------- Preview modal ---------- */
.project-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.project-modal-backdrop { position: absolute; inset: 0; background: rgba(10,25,18,.65); backdrop-filter: blur(5px); }
.project-modal-panel { position: relative; width: min(1280px,100%); height: min(900px,calc(100vh - 48px)); display: flex; flex-direction: column; overflow: hidden; background: #fff; border-radius: var(--radius); box-shadow: 0 30px 80px rgba(10,25,18,.3); }
.project-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--bg); }
.modal-label { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
.project-modal-head h3 { font-size: 18px; margin: 2px 0 0; }
.modal-actions { display: flex; align-items: center; gap: 10px; }
.modal-close { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.modal-close:hover { border-color: var(--orange); color: var(--orange); }
#modal-frame { flex: 1; width: 100%; border: 0; background: #fff; }

/* ---------- Footer ---------- */
.site-footer { padding: 74px 0 26px; background: var(--ink); color: #F3F7F4; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 50px; }
.footer-logo-mark { width: 74px; height: auto; flex: none; border-radius: 16px; }
.footer-wordmark { display: flex; flex-direction: column; line-height: 1.1; }
.footer-wordmark strong { font-size: 25px; font-weight: 800; letter-spacing: -.03em; }
.footer-wordmark small { margin-top: 5px; color: #8FD3AE; font-size: 11px; font-weight: 700; letter-spacing: 2px; }
.footer-tagline { color: #AFC2B7; font-size: 14px; margin: 18px 0 0; max-width: 320px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links span { color: #8FD3AE; font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 6px; }
.footer-links a { color: #AFC2B7; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.15); color: #7E9689; font-size: 11px; letter-spacing: 1px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .about-grid, .contact-grid, .section-head { grid-template-columns: 1fr; }
  .hero-visual { max-width: 620px; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
  .nav-links { display: none; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 10px 24px 18px; background: #fff; border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .section { padding: 78px 0; }
  .hero { padding: 76px 0 64px; }
}
@media (max-width: 600px) {
  .container { width: min(var(--container), calc(100% - 36px)); }
  .services-grid, .portfolio-grid, .process-grid, .form-row, .footer-grid { grid-template-columns: 1fr; }
  .hero-note { right: 8px; bottom: -16px; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .project-modal { padding: 12px; }
  .project-modal-panel { height: calc(100vh - 24px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .cursor { animation: none; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
