
/* Color system from user palette */
:root {
  --ink-900: #0e1a22; /* derived deep background */
  --primary-900: #1B3C53; /* base */
  --primary-800: #234C6A;
  --primary-600: #456882;
  --sand-200: #D2C1B6; /* accent */

  --bg: linear-gradient(180deg, #0f1620 0%, var(--primary-900) 100%);
  --text: #dfe8f0;
  --muted: #9fb1bf;
  --card: #142836;
  --border: rgba(210,193,182,0.18);
  --glow: rgba(69,104,130,0.45);
  --shadow: rgba(27,60,83,0.5);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: -1;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(14,26,34,0.95);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
  will-change: transform;
  transform: translateZ(0);
  transition: all 0.3s ease;
}
.site-header .container { padding-left: 0; padding-right: 0; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

brand {
   display: inline-grid;
   place-items: center;
   width: 36px;
   height: 36px;
   border-radius: 10px;
   background: radial-gradient(120px 60px at 20% -10%, var(--sand-200) 0%, transparent 60%),
               linear-gradient(135deg, var(--primary-800), var(--primary-900));
   color: #0b141b;
   text-decoration: none;
   font-weight: 800;
 }
.logo-link {
  display: inline-flex;
  align-items: center;
  margin-right: 12px;
  text-decoration: none;
}
.logo {
  width: 70px;
  height: 70px;
  display: block;
  object-fit: contain;
  border-radius: 6px;
}
.logo-link:focus {
  outline: 2px solid var(--sand-200);
  outline-offset: 2px;
  border-radius: 6px;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 20px;
  font-weight: 600;
}

.nav-links a:hover {
  color: var(--sand-200);
}

/* Hero */
.hero {
  padding: 72px 0 40px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 28px;
  position: relative;
}

.avatar {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(100px 80px at 30% 20%, var(--sand-200) 0%, rgba(210,193,182,0.2) 60%, transparent 70%),
              linear-gradient(135deg, var(--primary-600), var(--primary-900));
  box-shadow: 0 20px 60px var(--shadow);
  flex: 0 0 auto;
  will-change: transform;
  transform: translateZ(0);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar .glow {
  position: absolute;
  inset: -24px;
  filter: blur(24px);
  -webkit-filter: blur(24px);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--glow), transparent 60%);
  pointer-events: none;
  will-change: opacity;
  transform: translateZ(0);
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
}

.tagline-card {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(20,40,54,0.8), rgba(20,40,54,0.35));
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.tagline-card .tiny {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.tagline-card h1 {
  margin: 4px 0 0;
  font-size: 28px;
}

.accent {
  color: var(--sand-200);
}

.title {
  font-size: 36px;
  margin: 10px 0 0;
}

.typing {
  position: relative;
  display: inline-block; /* shrink-width to text */
  vertical-align: middle;
}

.typing::after {
  content: '';
  position: absolute;
  top: 0.12em; /* align with text baseline */
  width: 2px;
  height: 1.1em;
  background: var(--sand-200);
  animation: blink .9s steps(1,end) infinite;
}

.hero .title,
.hero .subtitle,
.tagline-card {
  animation: rise .7s ease both;
  will-change: transform, opacity;
}

.hero .subtitle {
  animation-delay: .1s;
}

.tagline-card {
  animation-delay: .05s;
}

.subtitle {
  max-width: 760px;
  line-height: 1.7;
  color: var(--muted);
  margin: 8px 0 0;
}

.cta {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.btn,
.btndef {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: transform .15s ease, box-shadow .2s ease;
  will-change: transform;
  transform: translateZ(0);
}

.btn.primary,
.btndef.primary {
  background: linear-gradient(135deg, var(--primary-800), var(--primary-900));
}

.btn.ghost,
.btndef.ghost {
  background: transparent;
}

.btn.tiny,
.btndef.tiny {
  padding: 8px 12px;
  font-size: 12px;
}

.btn:hover,
.btndef:hover {
  transform: translateY(-1px) translateZ(0);
  box-shadow: 0 12px 30px rgba(0,0,0,.35), 0 0 0 1px var(--border) inset;
}

/* Sections */
.section {
  padding: 72px 0;
  content-visibility: auto;
}

.section-title {
  justify-content: center;
  display: flex;
  font-size: 20px;
  margin: 0 0 18px;
  color: var(--sand-200);
}

.muted {
  color: var(--muted);
}

/* Work cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(20,40,54,0.9), rgba(20,40,54,0.45));
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.02) inset;
  will-change: transform, opacity;
  transform: translateZ(0);
}

.card h4 {
  margin: 4px 0 8px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.about-card {
  max-width: 900px;
  margin: 0 auto;
}

.about-text {
  margin: 0 0 20px 0 !important;
  line-height: 1.8;
  font-size: 15px;
  color: var(--text);
}

.about-text:last-child {
  margin-bottom: 0 !important;
}

/* Socials */
.socials {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.icons {

  display: flex;
  gap: 10px;
  scale: 1.3;
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-800), var(--primary-900));
  color: #0b141b;
  font-weight: 800;
  text-decoration: none;
}

/* Projects */
.projects {
  position: relative;
}

.projects .halo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateZ(0);
  top: -20px;
  width: 460px;
  height: 220px;
  border-radius: 50%;
  filter: blur(50px);
  -webkit-filter: blur(50px);
  background: radial-gradient(circle at 50% 40%, rgba(69,104,130,0.5), transparent 60%);
  pointer-events: none;
  will-change: opacity;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.project {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 18px;
  align-items: center;
}

.project.alt {
  grid-template-columns: 1fr 1.1fr;
}

.project-media {
  height: 220px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-900));
  box-shadow: 0 40px 100px rgba(0,0,0,0.45), 0 0 0 1px var(--border) inset;
  will-change: transform, opacity;
  transform: translateZ(0);
  overflow: hidden;
  position: relative;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 16px;
}

.project-content {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(20,40,54,0.9), rgba(20,40,54,0.45));
  will-change: transform, opacity;
  transform: translateZ(0);
}

.project-content h4 {
  margin: 0 0 6px;
}

.project-content p {
  margin: 0 0 10px;
  color: var(--muted);
}

/* Keyframes */
@keyframes blink {
  50% { opacity: 0; }
}

@keyframes rise {
  from { transform: translateY(8px) translateZ(0); opacity: 0; }
  to   { transform: translateY(0) translateZ(0); opacity: 1; }
}

/* Contact */
.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 40px;
  background: rgba(14,26,34,0.5);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 960px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .project,
  .project.alt { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .nav-links { display: none; }
  .hero { flex-direction: column; align-items: flex-start; }
  .title { font-size: 30px; }
  .cards-grid { grid-template-columns: 1fr; }
}