/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #0f0f0f;
  --gray-900: #1a1a1a;
  --gray-700: #3d3d3d;
  --gray-500: #6b6b6b;
  --gray-300: #c4c4c4;
  --gray-100: #f2f0eb;
  --gray-50: #faf9f7;
  --white: #ffffff;
  --accent: #c0392b;
  --accent-light: #fdf0ef;
  --green: #1a7a4a;
  --terminal-bg: #0d1117;
  --terminal-green: #3fb950;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', 'Fira Code', monospace;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.12), 0 12px 32px rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

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

/* ===== NAVIGATION ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 60px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--black);
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--gray-700);
  transition: color 0.2s;
}

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

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--black);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  padding: 16px 24px;
  gap: 16px;
}

.nav-mobile a {
  font-size: 15px;
  color: var(--gray-700);
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
}

.nav-mobile.open { display: flex; }

/* ===== HERO ===== */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: 80px 24px 80px;
  min-height: calc(100vh - 60px);
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 20px;
  background: var(--accent-light);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1.1;
  color: var(--black);
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.hero-title em {
  font-style: italic;
  color: var(--gray-500);
}

.hero-sub {
  font-size: 16px;
  color: var(--gray-700);
  line-height: 1.75;
  margin-bottom: 32px;
  max-width: 440px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--black);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, transform 0.15s;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--gray-900);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--black);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 400;
  border: 1px solid var(--gray-300);
  transition: border-color 0.2s, transform 0.15s;
  display: inline-block;
}

.btn-ghost:hover {
  border-color: var(--black);
  transform: translateY(-1px);
}

.btn-coffee {
  background: #FFDD00;
  color: #0f0f0f;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  display: inline-block;
  transition: transform 0.15s, box-shadow 0.15s;
  margin-top: 20px;
}

.btn-coffee:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* ===== TERMINAL ===== */
.terminal {
  background: var(--terminal-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  border: 1px solid #30363d;
}

.terminal-bar {
  background: #161b22;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #30363d;
}

.dot {
  width: 11px; height: 11px;
  border-radius: 50%;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #8b949e;
  margin-left: 8px;
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--terminal-green);
  min-height: 260px;
}

.terminal-body .cmd { color: #58a6ff; }
.terminal-body .comment { color: #8b949e; }
.terminal-body .warning { color: #f0883e; }
.terminal-body .cursor {
  display: inline-block;
  width: 8px; height: 14px;
  background: var(--terminal-green);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
}

@keyframes blink { 50% { opacity: 0; } }

/* ===== STATS ===== */
.stats {
  background: var(--black);
  padding: 48px 0;
}

.stats .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--white);
  letter-spacing: -1px;
}

.stat-label {
  font-size: 13px;
  color: var(--gray-300);
  margin-top: 4px;
  font-weight: 300;
}

/* ===== SECTIONS ===== */
.section { padding: 80px 0; }
.section-tinted { background: var(--gray-50); }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 40px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.5px;
}

.see-all {
  font-size: 14px;
  color: var(--gray-500);
  transition: color 0.2s;
}

.see-all:hover { color: var(--black); }

/* ===== POST CARDS ===== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 28px;
  display: block;
  transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.post-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-light);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 14px;
}

.post-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--black);
}

.post-card p {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.65;
  margin-bottom: 16px;
}

.post-meta {
  font-size: 12px;
  color: var(--gray-300);
  font-family: var(--font-mono);
}

/* ===== NOTES GRID ===== */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.note-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.note-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.note-icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.note-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--black);
}

.note-desc {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.5;
}

/* ===== COFFEE BANNER ===== */
.coffee-banner {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.coffee-text h2 {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.coffee-text p {
  font-size: 15px;
  color: var(--gray-700);
  max-width: 460px;
  line-height: 1.7;
}

.coffee-img {
  font-size: 80px;
  flex-shrink: 0;
  opacity: 0.8;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--black);
  padding: 48px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #2a2a2a;
  margin-bottom: 24px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--white);
  margin-bottom: 8px;
}

.footer-tagline {
  font-size: 13px;
  color: var(--gray-500);
  font-family: var(--font-mono);
}

.footer-links, .footer-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a, .footer-social a {
  font-size: 14px;
  color: var(--gray-500);
  transition: color 0.2s;
}

.footer-links a:hover, .footer-social a:hover {
  color: var(--white);
}

.footer-copy {
  text-align: center;
  font-size: 12px;
  color: #444;
  font-family: var(--font-mono);
}

/* ===== PAGE HERO (for inner pages) ===== */
.page-hero {
  padding: 60px 0 48px;
  border-bottom: 1px solid var(--gray-100);
}

.page-hero-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 14px;
  display: block;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.page-hero p {
  font-size: 16px;
  color: var(--gray-500);
  max-width: 520px;
  line-height: 1.7;
}

/* ===== BLOG PAGE ===== */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--gray-100);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 40px;
}

.blog-row {
  background: var(--white);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  transition: background 0.15s;
}

.blog-row:hover { background: var(--gray-50); }

.blog-row-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 10px;
  border-radius: 100px;
  flex-shrink: 0;
  min-width: 90px;
  text-align: center;
}

.blog-row-title {
  font-size: 15px;
  font-weight: 500;
  flex: 1;
  color: var(--black);
}

.blog-row-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray-300);
  flex-shrink: 0;
}

/* ===== NOTES PAGE ===== */
.notes-section { margin-top: 48px; }

.notes-section-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--black);
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 48px;
}

.notes-item {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow 0.15s, transform 0.15s;
}

.notes-item:hover {
  box-shadow: var(--shadow);
  transform: translateX(4px);
}

.notes-item-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.notes-item-text { flex: 1; }
.notes-item-title { font-size: 15px; font-weight: 500; }
.notes-item-sub { font-size: 13px; color: var(--gray-500); margin-top: 2px; }
.notes-item-arrow { color: var(--gray-300); font-size: 18px; }

/* ===== PORTFOLIO ===== */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 40px;
}

.portfolio-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 32px;
}

.portfolio-card-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.portfolio-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 12px;
}

.portfolio-card p {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.7;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.skill-tag {
  font-size: 12px;
  font-family: var(--font-mono);
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--gray-100);
  color: var(--gray-700);
}

.cert-list {
  list-style: none;
  margin-top: 12px;
}

.cert-list li {
  font-size: 14px;
  color: var(--gray-700);
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 10px;
}

.cert-list li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  font-size: 13px;
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 40px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  transition: box-shadow 0.2s;
}

.contact-item:hover { box-shadow: var(--shadow); }

.contact-icon {
  width: 44px; height: 44px;
  background: var(--white);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  border: 1px solid var(--gray-100);
}

.contact-label { font-size: 12px; color: var(--gray-500); margin-bottom: 2px; }
.contact-value { font-size: 14px; font-weight: 500; color: var(--black); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-hamburger { display: block; }

  .hero {
    grid-template-columns: 1fr;
    padding: 40px 20px 60px;
    min-height: auto;
    gap: 40px;
  }

  .stats .container { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: 1fr; }
  .notes-grid { grid-template-columns: 1fr 1fr; }
  .coffee-banner { flex-direction: column; text-align: center; }
  .coffee-img { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .blog-row { flex-wrap: wrap; gap: 10px; }
  .notes-grid { grid-template-columns: 1fr; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-inner > * {
  animation: fadeUp 0.6s ease both;
}

.hero-label { animation-delay: 0.05s; }
.hero-title { animation-delay: 0.1s; }
.hero-sub { animation-delay: 0.15s; }
.hero-actions { animation-delay: 0.2s; }
.hero-visual { animation: fadeUp 0.7s 0.25s ease both; }
