:root {
  --navy: #0b1f33;
  --navy-2: #102d49;
  --blue: #1687ee;
  --blue-2: #52b7ff;
  --ink: #14273a;
  --muted: #617287;
  --line: #dbe5ee;
  --surface: #f5f8fb;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(11, 31, 51, .10);
  --radius: 18px;
  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: "DM Sans", sans-serif;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
.container { width: min(var(--container), calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  background: rgba(11,31,51,.90); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: white; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.35); border-radius: 10px;
  font-family: Manrope, sans-serif; font-size: 14px; font-weight: 800;
  letter-spacing: -.04em;
}
.brand-text { display: grid; line-height: 1.1; }
.brand-text strong { font-family: Manrope, sans-serif; font-size: 13px; letter-spacing: .08em; }
.brand-text small { margin-top: 4px; font-size: 8px; letter-spacing: .16em; opacity: .65; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: #b8c7d6; font-size: 13px; position: relative; padding: 28px 0 25px; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 17px; height: 2px; background: var(--blue); transform: scaleX(0); transition: .2s; }
.nav-links a:hover, .nav-links a.active { color: white; }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; }
.nav-toggle span { display: block; width: 25px; height: 2px; margin: 5px; background: white; }

.hero {
  min-height: 760px; padding: 150px 0 90px; position: relative; overflow: hidden;
  background: linear-gradient(120deg, #071a2c 0%, #0e2944 60%, #123b60 100%);
  color: white;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 72% 45%, rgba(47,164,255,.18), transparent 32%);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr .8fr; gap: 70px; align-items: center; }
.eyebrow { margin: 0 0 12px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.eyebrow.light { color: #59b8ff; }
.hero h1, h2, h3 { font-family: Manrope, sans-serif; }
.hero h1 { max-width: 720px; margin: 0; font-size: clamp(44px, 5vw, 72px); line-height: 1.08; letter-spacing: -.045em; }
.hero h1 span { color: #7ac9ff; }
.hero-description { max-width: 680px; margin: 24px 0 0; color: #b8cadb; font-size: 17px; }
.hero-actions { display: flex; gap: 13px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; border-radius: 9px; padding: 13px 20px; font-weight: 700; font-size: 13px; border: 1px solid transparent; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: white; background: var(--blue); box-shadow: 0 9px 22px rgba(22,135,238,.25); }
.button-primary:hover { background: #0e78d6; }
.button-ghost { color: white; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.04); }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 650px; gap: 18px; margin-top: 56px; }
.principles > div { border-left: 1px solid rgba(255,255,255,.15); padding-left: 15px; }
.principle-icon { display: block; color: #4bb3ff; font-family: monospace; font-size: 20px; margin-bottom: 5px; }
.principles strong, .principles small { display: block; }
.principles strong { font-size: 13px; }
.principles small { margin-top: 3px; color: #94abc0; font-size: 11px; }

.hero-photo-wrap { justify-self: end; width: min(420px, 100%); }
.hero-photo-frame {
  position: relative; min-height: 500px; border-radius: 24px; overflow: hidden;
  background: linear-gradient(145deg, #173c5e, #091d31);
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 35px 90px rgba(0,0,0,.3);
}
.profile-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.profile-photo[src] { display: block; }
.profile-photo[src] + .photo-fallback { display: none; }
.photo-fallback { height: 100%; min-height: 500px; display: grid; place-items: center; align-content: center; gap: 10px; color: #8cb6d5; }
.photo-fallback span { width: 150px; height: 150px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); font: 800 52px Manrope; }
.photo-fallback small { font-size: 11px; opacity: .7; }
.hero-photo-caption { display: flex; justify-content: space-between; color: #8fa8bd; font-size: 11px; padding: 13px 4px; }

.section { padding: 110px 0; }
.about { background: #fff; }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; align-items: center; }
.section h2 { margin: 0; font-size: clamp(34px, 4vw, 48px); letter-spacing: -.04em; line-height: 1.12; }
.section-intro > p:not(.eyebrow) { max-width: 610px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 34px 0; }
.stats div { border-left: 1px solid var(--line); padding-left: 18px; }
.stats strong { display: block; color: #0e68ad; font: 800 31px Manrope; }
.stats span { color: var(--muted); font-size: 11px; line-height: 1.35; display: block; }
blockquote { margin: 34px 0 0; color: #34506a; font: 500 17px/1.5 Manrope; }
.about-visual { min-height: 410px; position: relative; }
.code-card { background: #0b1f33; color: #bfe3ff; border-radius: 20px; padding: 22px; box-shadow: var(--shadow); transform: rotate(2deg); }
.window-bar { display: flex; gap: 6px; margin-bottom: 20px; }
.window-bar i { width: 8px; height: 8px; border-radius: 50%; background: #4d6a82; }
.code-card pre { margin: 0; overflow: auto; font: 14px/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; }
.visual-note { position: absolute; right: 0; bottom: 0; width: 230px; padding: 25px; background: #edf6ff; border: 1px solid #d5eaff; border-radius: 18px; box-shadow: var(--shadow); }
.visual-note span { display: block; font: 700 15px Manrope; color: #1a537c; margin: 7px 0; }

.professional { background: var(--surface); }
.section-heading { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; align-items: end; margin-bottom: 45px; }
.section-heading > p { margin: 0; color: var(--muted); }
.capability-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.capability-card { background: white; border: 1px solid #e2eaf1; border-radius: var(--radius); padding: 27px; box-shadow: 0 8px 28px rgba(13,43,70,.04); transition: .2s; }
.capability-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: #e7f4ff; color: #0f7bd1; font-size: 21px; }
.capability-card h3 { font-size: 17px; margin: 18px 0 8px; }
.capability-card p { margin: 0; color: var(--muted); font-size: 13px; }
.career-note { margin-top: 35px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; padding: 30px; background: var(--navy); color: white; border-radius: var(--radius); }
.career-note h3 { margin: 0; font-size: 25px; }
.career-note p:last-child { margin: 0; color: #adc1d2; }

.portfolio { background: #fff; }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.project-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; min-height: 330px; display: flex; flex-direction: column; transition: .2s; }
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.project-number { color: #9aaabd; font: 700 12px ui-monospace; }
.project-content { margin-top: auto; }
.project-card h3 { margin: 0 0 10px; font-size: 22px; }
.project-card p { color: var(--muted); font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0; }
.tags span { padding: 4px 8px; background: #eef5fa; border-radius: 999px; color: #48647d; font-size: 10px; font-weight: 700; }
.project-link { color: #0876cf; font-size: 12px; font-weight: 800; }
.portfolio-note { text-align: center; margin: 28px 0 0; color: #8291a1; font-size: 11px; }

.contact { background: #eef6fc; }
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; align-items: start; }
.contact-copy > p:not(.eyebrow) { color: var(--muted); max-width: 480px; }
.contact-points { display: grid; gap: 22px; margin-top: 35px; }
.contact-points > div { display: flex; gap: 14px; align-items: flex-start; }
.contact-points > div > span { width: 38px; height: 38px; display: grid; place-items: center; background: #dceeff; color: #0876cf; border-radius: 10px; }
.contact-points strong, .contact-points small { display: block; }
.contact-points strong { font-size: 13px; }
.contact-points small { color: var(--muted); font-size: 11px; margin-top: 2px; }

.contact-form { padding: 30px; background: white; border: 1px solid #dae7f0; border-radius: 16px; box-shadow: var(--shadow); }
.contact-form label { position: relative; display: block; margin-bottom: 18px; font-size: 11px; font-weight: 800; color: #29445d; }
.contact-form label > span:first-child { color: #e14f4f; }
.label-note { color: #7b8d9e !important; font-weight: 500; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
input, textarea { width: 100%; margin-top: 7px; padding: 12px 13px; border: 1px solid #d8e2ea; border-radius: 8px; outline: none; color: var(--ink); background: #fff; font-size: 13px; }
input:focus, textarea:focus { border-color: #5aafea; box-shadow: 0 0 0 3px rgba(22,135,238,.08); }
textarea { min-height: 130px; resize: vertical; }
.char-count { position: absolute; right: 4px; bottom: -18px; color: #8495a5; font-size: 10px; font-weight: 500; }
input[type="file"] { padding: 10px; }
input[type="file"]::file-selector-button { border: 0; background: #edf6ff; color: #0c6db7; border-radius: 6px; padding: 7px 10px; font-weight: 700; margin-right: 8px; cursor: pointer; }
.contact-form label > small { display: block; color: #8797a6; font-size: 10px; font-weight: 500; margin-top: 5px; }
.form-status { min-height: 20px; margin: 8px 0 12px; font-size: 12px; }
.form-status.error { color: #c53f3f; }
.form-status.success { color: #18744a; }
.submit-button { border: 0; }
.submit-button[disabled] { opacity: .65; cursor: wait; transform: none; }
.form-disclaimer { margin: 13px 0 0; color: #8b99a6; font-size: 10px; }

.footer { background: #071a2c; color: #a8bbcd; padding: 25px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-brand .brand-mark { width: 36px; height: 36px; }
.footer p { margin: 0; font-size: 10px; }
.back-top { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #38526a; border-radius: 50%; color: white; }

.reveal { opacity: 0; transform: translateY(18px); transition: .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .hero-grid, .split-grid, .contact-grid { grid-template-columns: 1fr; gap: 50px; }
  .hero { min-height: auto; }
  .hero-photo-wrap { justify-self: start; max-width: 390px; }
  .capability-grid { grid-template-columns: repeat(2, 1fr); }
  .section-heading, .career-note { grid-template-columns: 1fr; gap: 18px; }
  .project-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .container { width: min(var(--container), calc(100% - 28px)); }
  .nav { min-height: 66px; }
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; left: 14px; right: 14px; top: 62px; padding: 10px; background: #0b1f33; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; flex-direction: column; gap: 0; align-items: stretch; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
  .nav-links a::after { bottom: 4px; left: 12px; right: auto; width: 20px; }
  .hero { padding: 115px 0 65px; }
  .hero h1 { font-size: 43px; }
  .hero-description { font-size: 15px; }
  .principles { grid-template-columns: 1fr; margin-top: 35px; }
  .principles > div { border-left: 0; border-top: 1px solid rgba(255,255,255,.15); padding: 12px 0 0; }
  .hero-photo-frame, .photo-fallback { min-height: 390px; }
  .section { padding: 75px 0; }
  .stats { grid-template-columns: 1fr; gap: 14px; }
  .capability-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form { padding: 20px; }
  .footer-inner { flex-wrap: wrap; }
}
