*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:            #0F1215; /* Obsidian */
  --card:          hsla(210, 15%, 12%, 0.4);
  --primary:       #E5C38C; /* Golden Sand */
  --primary-dim:   rgba(229, 195, 140, 0.1);
  --secondary:     #8A8D91; /* Charcoal Silk */
  --muted:         #8A8D91;
  --border:        rgba(229, 195, 140, 0.1);
  --border-subtle: rgba(255, 255, 255, 0.05);
  --white:         #FFFFFF;
  --radius:        0.75rem;
  --radius-lg:     1rem;
  --radius-xl:     1.5rem;
  --font-body:     'Inter', sans-serif;
  --font-display:  'Plus Jakarta Sans', sans-serif;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

/* BACKGROUND AMBIENCE - BOKEH */
.bokeh-container {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: -1; pointer-events: none; overflow: hidden;
  filter: blur(80px); opacity: 0.4;
}
.bokeh-circle {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, var(--primary-dim) 0%, transparent 70%);
  animation: bokehMove 20s infinite ease-in-out alternate;
}
.bokeh-1 { width: 40vw; height: 40vw; top: -10%; right: -5%; animation-duration: 25s; }
.bokeh-2 { width: 35vw; height: 35vw; bottom: 10%; left: -5%; animation-duration: 30s; animation-delay: -5s; }
.bokeh-3 { width: 25vw; height: 25vw; top: 40%; left: 30%; animation-duration: 22s; animation-delay: -2s; }

@keyframes bokehMove {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5%, 10%) scale(1.1); }
  100% { transform: translate(-5%, -5%) scale(0.9); }
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.15; }
img { display: block; max-width: 100%; }
a   { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
::selection { background: hsla(217, 91%, 60%, 0.3); }

/* UTILITIES */
.gradient-text {
  background: linear-gradient(90deg, #E5C38C, #C69F6A);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.container-wide   { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 900px;  margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: 6rem 0; position: relative; }
.section-alt { background: hsla(226, 30%, 12%, 0.4); }
.section-border-top { border-top: 1px solid var(--border-subtle); }
.section-header { margin-bottom: 4rem; }
.section-header h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); color: var(--white); margin-bottom: 0.75rem; }
.section-header p  { color: var(--muted); font-size: 1.1rem; }
.section-header-center { text-align: center; }
.section-header-center p { max-width: 600px; margin: 0 auto; }
.max-600 { max-width: 600px; }

/* ANIMATIONS */
@keyframes fadeUp   { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeScale { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
@keyframes pulse    { 0%, 100% { opacity: 0.6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }

.fade-up    { animation: fadeUp    0.6s ease both; }
.fade-scale { animation: fadeScale 0.7s ease 0.1s both; }

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* NAVBAR */
#navbar {
  position: fixed; top: 0; width: 100%; z-index: 100;
  transition: background 0.3s, padding 0.3s;
  padding: 1.25rem 0;
}
#navbar.scrolled {
  background: hsla(226, 40%, 9%, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  padding: 0.75rem 0;
}
.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  color: var(--white); display: flex; align-items: center; gap: 0.5rem;
}
.nav-logo-mark {
  width: 2rem; height: 2rem; border-radius: 0.5rem;
  background: var(--primary-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: var(--primary);
  transition: background 0.2s;
}
.nav-logo:hover .nav-logo-mark { background: hsla(217, 91%, 60%, 0.25); }
.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-links a {
  padding: 0.5rem 1rem; font-size: 0.875rem; font-weight: 500;
  color: var(--muted); border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--white); background: hsla(0,0%,100%,0.05); }
.nav-toggle { display: none; padding: 0.5rem; color: var(--muted); transition: color 0.2s; }
.nav-toggle:hover { color: var(--white); }
.nav-mobile {
  display: none; flex-direction: column; padding: 1rem 1.5rem;
  background: hsla(226, 40%, 9%, 0.95); backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
}
.nav-mobile.open { display: flex; }
.nav-mobile-link {
  padding: 0.75rem 1rem; font-size: 1rem; font-weight: 500;
  color: var(--white); border-radius: var(--radius); transition: background 0.2s;
}
.nav-mobile-link:hover { background: hsla(0,0%,100%,0.05); }
@media (max-width: 767px) { .nav-links { display: none; } .nav-toggle { display: flex; } }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: var(--radius);
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 500;
  transition: all 0.2s; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #0F1215; }
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--white); border: 1px solid var(--border); }
.btn-outline:hover { background: hsla(0,0%,100%,0.06); border-color: hsla(0,0%,100%,0.2); }
.btn-ghost  { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--white); background: hsla(0,0%,100%,0.04); }

/* HERO */
.hero {
  min-height: 100vh; padding: 4rem 1.5rem 5rem;
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-direction: column-reverse; align-items: center; gap: 3rem;
}
@media (min-width: 768px) { .hero { flex-direction: row; gap: 5rem; padding: 5rem 1.5rem 8rem; } }
.hero-text { flex: 1; text-align: center; }
@media (min-width: 768px) { .hero-text { text-align: left; } }
.hero-text h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800;
  color: var(--white); margin-bottom: 1.5rem; line-height: 1.08;
}
.br-desktop { display: none; }
@media (min-width: 768px) { .br-desktop { display: block; } }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem); color: var(--muted);
  max-width: 600px; line-height: 1.7; margin: 0 auto 2.5rem;
}
@media (min-width: 768px) { .hero-sub { margin: 0 0 2.5rem; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
@media (min-width: 768px) { .hero-actions { justify-content: flex-start; } }
.hero-portrait { position: relative; width: 200px; height: 200px; flex-shrink: 0; }
@media (min-width: 768px) { .hero-portrait { width: 320px; height: 320px; } }
.portrait-glow {
  position: absolute; inset: 0; border-radius: 9999px;
  background: var(--primary-dim); filter: blur(48px);
  animation: pulse 4s ease-in-out infinite; z-index: 0;
}
.portrait-frame {
  position: absolute; inset: 0; border-radius: 9999px;
  border: 1px solid hsla(0,0%,100%,0.1); overflow: hidden;
  background: var(--card); z-index: 1;
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }

/* TIMELINE */
.timeline {
  position: relative;
  padding-left: 2rem; display: flex; flex-direction: column; gap: 3rem;
}
/* Traceability Line */
.timeline::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px;
  background: rgba(229, 195, 140, 0.1);
}
.timeline-progress {
  position: absolute; left: 0; top: 0;
  width: 2px; height: 0%;
  background: var(--primary);
  box-shadow: 0 0 15px var(--primary-dim);
  z-index: 1;
}
.timeline-item { position: relative; }
.timeline-dot {
  position: absolute; left: calc(-2rem - 9px); top: 1.25rem;
  width: 1rem; height: 1rem; border-radius: 9999px;
  background: var(--bg); border: 2px solid var(--primary);
  box-shadow: 0 0 0 4px var(--bg);
  z-index: 2;
}

/* CARDS */
.card {
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(229, 195, 140, 0.1);
  border-radius: var(--radius-lg); padding: 1.5rem; transition: border-color 0.3s, background 0.3s;
}
.card:hover { border-color: rgba(229, 195, 140, 0.3); background: hsla(210, 15%, 15%, 0.5); }
.card-row { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; }
@media (min-width: 640px) { .card-row { flex-direction: row; justify-content: space-between; align-items: flex-start; } }
.role    { font-size: 1.1rem; font-weight: 700; color: var(--white); margin-bottom: 0.2rem; }
.company { font-size: 0.95rem; font-weight: 600; color: var(--primary); }
.period  {
  display: inline-flex; align-items: center; padding: 0.25rem 0.75rem;
  border-radius: 9999px; background: hsla(0,0%,100%,0.05);
  border: 1px solid var(--border-subtle); font-size: 0.8rem;
  color: var(--muted); white-space: nowrap; flex-shrink: 0;
}
.desc { color: var(--muted); line-height: 1.7; margin-bottom: 1.25rem; font-size: 0.95rem; }

/* TAGS */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  display: inline-flex; align-items: center; padding: 0.25rem 0.7rem;
  border-radius: 0.4rem; font-size: 0.78rem; font-weight: 500;
  background: transparent; border: 1px solid var(--border); color: var(--muted);
}
.tag-secondary { background: hsla(0,0%,100%,0.05); border-color: transparent; }
.tag-secondary:hover { background: hsla(0,0%,100%,0.08); }

/* IMPACT */
.impact-bg-glow {
  position: absolute; top: 0; right: 0;
  width: 700px; height: 700px;
  background: hsla(217, 91%, 60%, 0.05);
  border-radius: 9999px; filter: blur(120px); pointer-events: none; z-index: 0;
}
.impact-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.5rem; position: relative;
}
@media (min-width: 640px)  { .impact-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .impact-grid { grid-template-columns: repeat(3, 1fr); } }
.impact-card {
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(229, 195, 140, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.75rem; display: flex; flex-direction: column; gap: 0.5rem;
  transition: border-color 0.3s, background 0.3s, transform 0.2s;
}
.impact-card:hover {
  border-color: rgba(229, 195, 140, 0.25);
  background: hsla(210, 15%, 15%, 0.5);
  transform: translateY(-2px);
}
.impact-icon {
  width: 3rem; height: 3rem; border-radius: 0.75rem;
  background: hsla(0,0%,100%,0.05); display: flex; align-items: center;
  justify-content: center; margin-bottom: 0.75rem; transition: transform 0.3s;
}
.impact-card:hover .impact-icon { transform: scale(1.1); }
.impact-metric { font-size: 1.5rem; font-weight: 800; font-family: var(--font-display); }
.impact-title  { font-size: 1rem; font-weight: 600; color: var(--white); }
.impact-desc   { font-size: 0.9rem; color: var(--muted); line-height: 1.65; margin-top: 0.25rem; }

/* PRODUCTS */
.product-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 6rem; }
@media (min-width: 900px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
.product-card {
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(229, 195, 140, 0.1);
  border-radius: var(--radius-lg);
  padding: 1.75rem; display: flex; flex-direction: column; gap: 0.75rem;
  transition: box-shadow 0.3s, border-color 0.3s, background 0.3s;
}
.product-card:hover {
  border-color: rgba(229, 195, 140, 0.3);
  background: hsla(210, 15%, 15%, 0.5);
  box-shadow: 0 8px 32px rgba(229, 195, 140, 0.05);
}
.product-category {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; font-weight: 600; color: var(--primary);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.product-title { font-size: 1.35rem; font-weight: 700; color: var(--white); }
.product-desc  { font-size: 0.95rem; color: var(--muted); line-height: 1.6; flex: 1; }
.product-footer {
  border-top: 1px solid var(--border-subtle); margin-top: 0.5rem;
  padding-top: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem;
}
.impact-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; margin-bottom: 0.2rem; }
.impact-value { font-size: 0.95rem; color: var(--white); font-weight: 500; }
.product-learn-more {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.82rem; font-weight: 600; color: var(--primary);
  margin-top: 0.5rem; transition: gap 0.2s;
}
.product-learn-more:hover { gap: 0.55rem; }

.personal-projects { margin-top: 4rem; padding-top: 3.5rem; border-top: 1px solid var(--border-subtle); text-align: left; }
.personal-projects-header { margin-bottom: 2.5rem; }
.personal-projects-header h3 { font-size: 1.5rem; color: var(--white); margin-bottom: 0.5rem; }
.personal-projects-header p  { color: var(--muted); }
.personal-projects-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
@media (max-width: 900px) { .personal-projects-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .personal-projects-grid { grid-template-columns: 1fr; } }
.personal-project-card {
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(229, 195, 140, 0.1);
  border-radius: 1.25rem;
  padding: 1.75rem; display: flex; flex-direction: column; align-items: flex-start;
  gap: 1rem; text-align: left; transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.personal-project-card:hover { border-color: var(--primary); transform: translateY(-3px); background: hsla(210, 15%, 15%, 0.5); }
.personal-project-logo {
  width: 56px; height: 56px; min-width: 56px; min-height: 56px;
  max-width: 56px; max-height: 56px;
  border-radius: 12px; overflow: hidden;
  background: var(--surface-alt); border: 1px solid var(--border);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.personal-project-logo img { display: block; width: 56px; height: 56px; object-fit: cover; }
.personal-project-logo-placeholder {
  width: 56px; height: 56px; min-width: 56px; min-height: 56px;
  max-width: 56px; max-height: 56px;
  border-radius: 12px; background: var(--primary-dim);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 1rem;
  color: var(--primary); flex-shrink: 0;
}
.personal-project-body { flex: 1; width: 100%; }
.personal-project-headline { font-size: 0.78rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.4rem; }
.personal-project-name { font-size: 1.1rem; font-weight: 700; color: var(--white); margin-bottom: 0.5rem; font-family: 'Plus Jakarta Sans', sans-serif; }
.personal-project-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }
.personal-project-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.82rem; font-weight: 600; color: var(--primary);
  margin-top: auto; padding-top: 0.5rem; transition: gap 0.2s;
}
.personal-project-link:hover { gap: 0.55rem; }

/* THOUGHTS */
.thoughts-placeholder {
  padding: 5rem 2rem; text-align: center;
  border: 1px dashed var(--border-subtle); border-radius: var(--radius-xl);
  background: hsla(226, 40%, 9%, 0.3);
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.thoughts-icon {
  width: 3.5rem; height: 3.5rem; border-radius: 9999px;
  background: var(--primary-dim); display: flex; align-items: center;
  justify-content: center; color: var(--primary);
}
@keyframes spin { to { transform: rotate(360deg); } }
.thoughts-icon-spin svg { animation: spin 1s linear infinite; }
.thoughts-title { font-size: 1.1rem; font-weight: 600; color: var(--white); }
.thoughts-sub   { font-size: 0.9rem; color: var(--muted); max-width: 380px; line-height: 1.6; }

/* ARTICLES GRID */
.articles-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 2.5rem;
}
@media (min-width: 640px) { .articles-grid { grid-template-columns: repeat(2, 1fr); } }

.article-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.3s, transform 0.2s, box-shadow 0.3s;
  text-decoration: none; color: inherit;
}
.article-card:hover {
  border-color: hsla(217, 91%, 60%, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(37,99,235,0.1);
}
.article-thumb {
  width: 100%; height: 180px; object-fit: cover;
  background: var(--secondary); display: block;
}
.article-thumb-placeholder {
  width: 100%; height: 180px; background: var(--secondary);
  display: flex; align-items: center; justify-content: center; color: var(--border);
}
.article-body { padding: 1.25rem 1.5rem; display: flex; flex-direction: column; flex: 1; gap: 0.6rem; }
.article-date  { font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.article-title {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 700;
  color: var(--white); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-excerpt {
  font-size: 0.875rem; color: var(--muted); line-height: 1.6; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.article-read-more {
  margin-top: 0.75rem; font-size: 0.82rem; font-weight: 600;
  color: var(--primary); display: inline-flex; align-items: center; gap: 0.3rem;
}
.articles-footer { display: flex; justify-content: center; margin-top: 1rem; }

/* FOOTER */
.footer { border-top: 1px solid var(--border-subtle); padding: 3rem 0; margin-top: 6rem; }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  color: var(--muted); font-size: 0.875rem;
}
@media (min-width: 640px) { .footer-inner { flex-direction: row; justify-content: space-between; } }
.footer-links a { color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--white); }
