/* ---------- Basics ---------- */
:root {
  --bg: #14100d;
  --bg-alt: #1a1511;
  --card: #1f1915;
  --card-border: #322a23;
  --text: #f6ebdd;
  --muted: #bcad9c;
  --accent: #e0b48c;
  --accent-soft: rgba(224, 180, 140, 0.14);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 6%;
  background: rgba(20, 16, 13, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}

.logo {
  font-family: 'Instrument Serif', serif;
  font-size: 1.8rem;
  letter-spacing: 0.3px;
}

.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  font-size: 0.92rem;
  color: var(--muted);
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links .nav-cta {
  color: #1b130d;
  background: var(--accent);
  padding: 8px 22px;
  border-radius: 30px;
  font-weight: 600;
}
.nav-links .nav-cta:hover { color: #1b130d; opacity: 0.9; }

.menu-toggle { display: none; }
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.hamburger span { width: 26px; height: 3px; background: var(--text); border-radius: 3px; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  padding: 120px 6% 70px;
}

.hero-text { flex: 1.1; max-width: 640px; }

.pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(224, 180, 140, 0.12);
  border: 1px solid rgba(224, 180, 140, 0.18);
  padding: 9px 18px;
  border-radius: 30px;
  margin-bottom: 22px;
}

.hero h1 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(3rem, 6.4vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 26px;
}

.hero-desc {
  color: var(--muted);
  max-width: 520px;
  font-size: 0.98rem;
  margin-bottom: 30px;
}

.hero-btns { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  padding: 14px 30px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 0.3s, opacity 0.3s;
}
.btn:hover { transform: translateY(-3px); }
.btn.primary { background: var(--accent); color: #1b130d; }
.btn.dark { background: #1f1915; border: 1px solid var(--card-border); color: var(--text); }
.btn.dark:hover { border-color: var(--accent); }

/* Photo card (same look as the reference) */
.hero-photo { flex: 0.9; display: flex; justify-content: center; }

.photo-card {
  position: relative;
  width: min(390px, 86vw);
  aspect-ratio: 5 / 6;
  padding: 16px;
  border-radius: 34px;
  background: linear-gradient(160deg, #3a2f26, #1e1813);
  border: 1px solid #3d3228;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.photo-card img {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 22px;
}

.float-pill {
  position: absolute;
  z-index: 2;
  top: 30px; right: 30px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  background: rgba(31, 25, 21, 0.92);
  border: 1px solid var(--card-border);
  padding: 9px 18px;
  border-radius: 30px;
  backdrop-filter: blur(8px);
}

.photo-glow {
  position: absolute;
  z-index: 0;
  right: -50px; bottom: -50px;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 180, 140, 0.55), transparent 70%);
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 0 6% 70px;
  text-align: center;
}
.stat {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 26px 10px;
}
.stat h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 2.8rem;
  line-height: 1.1;
  color: var(--accent);
}
.stat p { color: var(--muted); font-size: 0.9rem; }

/* ---------- Sections ---------- */
.section { padding: 90px 6%; }
.section.alt { background: var(--bg-alt); }

.title {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(2.3rem, 4.5vw, 3.3rem);
  text-align: center;
  margin-bottom: 50px;
}
.title em { color: var(--accent); font-style: italic; }
.title::after {
  content: '';
  display: block;
  width: 60px; height: 3px;
  background: var(--accent);
  border-radius: 3px;
  margin: 14px auto 0;
}

.sub-title {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 2rem;
  margin: 60px auto 24px;
  max-width: 1100px;
  color: var(--accent);
}

/* ---------- About ---------- */
.about-wrap {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 50px;
  align-items: start;
}
.about-text p { color: var(--muted); margin-bottom: 16px; }
.about-text strong { color: var(--text); }

.info-list {
  display: grid;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 26px;
  font-size: 0.92rem;
}
.info-list div { word-break: break-word; }
.info-list span {
  display: block;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.skill-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 28px;
  transition: transform 0.3s, border-color 0.3s;
}
.skill-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.skill-card h3 { margin-bottom: 16px; color: var(--accent); font-size: 1.05rem; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li, .chips span {
  background: var(--accent-soft);
  border: 1px solid rgba(224, 180, 140, 0.3);
  color: #ecd2b6;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
}

/* ---------- Timeline ---------- */
.timeline {
  max-width: 850px;
  margin: 0 auto;
  padding-left: 34px;
  border-left: 2px solid var(--card-border);
}
.t-item { position: relative; margin-bottom: 36px; }
.t-dot {
  position: absolute;
  left: -43px; top: 28px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--bg);
}

.t-card, .project-card, .edu-card, .train-card, .list-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 28px;
}
.t-card h3 { font-size: 1.25rem; }
.t-card h4, .train-card h4 { color: var(--accent); font-weight: 500; font-size: 0.95rem; margin-bottom: 14px; }
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 14px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.t-card li, .train-card li, .project-card li, .list-card li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}
.t-card li::before, .train-card li::before, .project-card li::before, .list-card li::before {
  content: '\2726';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
}

/* ---------- Live projects ---------- */
.live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.live-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 28px;
  transition: transform 0.3s, border-color 0.3s;
}
.live-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.platform {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #1b130d;
  background: var(--accent);
  padding: 3px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.live-card h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.2;
  margin-bottom: 10px;
}
.live-card p { color: var(--muted); font-size: 0.92rem; }

/* ---------- Personal project ---------- */
.project-card {
  max-width: 1100px;
  margin: 0 auto;
  border-color: rgba(224, 180, 140, 0.35);
}
.project-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--accent);
  color: #1b130d;
  padding: 4px 16px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.project-card h3 { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 1.9rem; margin-bottom: 10px; }
.project-card > p { color: var(--muted); margin-bottom: 16px; }
.project-card .chips { margin-top: 18px; }

/* ---------- Education ---------- */
.edu-grid, .train-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.year {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 14px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.edu-card h3, .train-card h3 { font-size: 1.1rem; margin-bottom: 4px; }
.edu-card p { color: var(--muted); font-size: 0.92rem; }
.edu-card .muted { font-size: 0.85rem; margin-top: 6px; }

/* ---------- Certificates ---------- */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.list-card h3 { color: var(--accent); margin-bottom: 16px; }

/* ---------- Contact ---------- */
.contact-sub { text-align: center; color: var(--muted); max-width: 560px; margin: -20px auto 40px; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  max-width: 700px;
  margin: 0 auto;
}
.contact-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 32px 20px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
}
.contact-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.c-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--accent);
  color: #1b130d;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.contact-card h4 { margin-bottom: 4px; }
.contact-card p { color: var(--muted); font-size: 0.9rem; word-break: break-word; }

/* ---------- YouTube channel card ---------- */
.yt-card {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
  background: linear-gradient(145deg, var(--card), #261c16);
  border: 1px solid rgba(255, 0, 51, 0.35);
  border-radius: 20px;
  padding: 30px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.yt-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 0, 51, 0.7);
  box-shadow: 0 18px 45px rgba(255, 0, 51, 0.12);
}
.yt-icon {
  flex: 0 0 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  background: #ff0033;
  color: #fff;
  font-size: 2rem;
  padding-left: 5px;
  transition: transform 0.4s;
}
.yt-card:hover .yt-icon { transform: rotate(-8deg) scale(1.08); }
.yt-info { flex: 1; }
.yt-info h3 { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 1.9rem; line-height: 1.2; margin-bottom: 8px; }
.yt-info p { color: var(--muted); font-size: 0.92rem; margin-bottom: 14px; max-width: 560px; }
.yt-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; }

.btn.subscribe {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ff0033;
  color: #fff;
  padding: 14px 32px;
  animation: pulseRed 2.2s infinite;
}
.btn.subscribe:hover { background: #e00030; }
.sub-play { font-size: 0.75rem; }
.yt-visit { position: relative; font-size: 0.85rem; color: var(--muted); transition: color 0.3s, transform 0.3s; }
.yt-visit:hover { color: var(--accent); transform: translateX(4px); }

@keyframes pulseRed {
  0% { box-shadow: 0 0 0 0 rgba(255, 0, 51, 0.55); }
  70% { box-shadow: 0 0 0 16px rgba(255, 0, 51, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 0, 51, 0); }
}

/* ---------- Transitions & animations ---------- */
.contact-grid { max-width: 1000px; }

/* hero entrance */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}
.hero .pill { animation: fadeUp 0.7s ease 0.1s backwards; }
.hero h1 { animation: fadeUp 0.8s ease 0.25s backwards; }
.hero .hero-desc { animation: fadeUp 0.8s ease 0.4s backwards; }
.hero .hero-btns { animation: fadeUp 0.8s ease 0.55s backwards; }
.hero .photo-card { animation: fadeIn 1s ease 0.35s backwards; }
.photo-card img { transition: transform 0.8s ease; }
.photo-card:hover img { transform: scale(1.05); }
.float-pill { animation: bob 3.5s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* scroll reveal */
.reveal { opacity: 0; }
.reveal.in {
  opacity: 1;
  animation: fadeUp 0.75s ease backwards;
  animation-delay: var(--d, 0ms);
}

/* click feedback */
.btn, .contact-card, .live-card, .skill-card, .nav-cta, .to-top, .stat, .edu-card, .train-card, .t-card, .list-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.btn:active, .contact-card:active, .nav-cta:active { transform: scale(0.95); }

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(224, 180, 140, 0.4);
  transform: scale(0);
  animation: rippleAnim 0.65s ease-out forwards;
  pointer-events: none;
}
.btn.primary .ripple, .nav-cta .ripple, .to-top .ripple { background: rgba(255, 255, 255, 0.45); }
.btn.subscribe .ripple { background: rgba(255, 255, 255, 0.45); }
@keyframes rippleAnim { to { transform: scale(1); opacity: 0; } }

.pop { animation: pop 0.4s ease; }
@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(0.96); }
  100% { transform: scale(1); }
}

/* nav */
.nav-links a:not(.nav-cta) { position: relative; }
.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.nav-links a:not(.nav-cta):hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--accent); }
.navbar { transition: padding 0.3s, box-shadow 0.3s; }
.navbar.scrolled { padding-top: 11px; padding-bottom: 11px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45); }

/* hamburger to X */
.hamburger span { transition: transform 0.35s, opacity 0.25s; }
.menu-toggle:checked + .hamburger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle:checked + .hamburger span:nth-child(2) { opacity: 0; }
.menu-toggle:checked + .hamburger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* chips, buttons, hovers */
.chips li, .chips span { transition: transform 0.25s, background 0.25s; }
.chips li:hover, .chips span:hover { transform: translateY(-3px); background: rgba(224, 180, 140, 0.28); }
.stat, .edu-card, .train-card, .t-card, .list-card { transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s; }
.stat:hover, .edu-card:hover, .train-card:hover, .t-card:hover, .list-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35);
}
.c-icon { transition: transform 0.4s; }
.contact-card:hover .c-icon { transform: rotate(360deg) scale(1.1); }
.btn.primary:hover { box-shadow: 0 10px 28px rgba(224, 180, 140, 0.35); }

/* progress bar and back-to-top */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--accent);
  z-index: 200;
}
.to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 46px; height: 46px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #1b130d;
  font-size: 1.3rem;
  font-weight: 700;
  z-index: 150;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.35s, transform 0.35s;
}
.to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top.show:hover { transform: translateY(-4px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; }
}

@media (max-width: 900px) {
  .yt-card { flex-direction: column; text-align: center; }
  .yt-info p { margin-left: auto; margin-right: auto; }
  .yt-info .chips { justify-content: center; }
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 26px 6%;
  border-top: 1px solid var(--card-border);
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { flex-direction: column; text-align: left; padding-top: 110px; }
  .hero-photo { width: 100%; }
  .about-wrap { grid-template-columns: 1fr; gap: 30px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .hamburger { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--card-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s;
  }
  .nav-links a { padding: 14px 6%; width: 100%; text-align: center; }
  .nav-links .nav-cta { border-radius: 0; background: none; color: var(--accent); }
  .menu-toggle:checked ~ .nav-links { max-height: 480px; }
  .timeline { padding-left: 22px; }
  .t-dot { left: -31px; }
}
