/* ===== CSS VARIABLES ===== */
:root {
  --bg: #0d0d0f;
  --bg2: #141418;
  --bg3: #1a1a22;
  --accent: #e8c46a;
  --accent2: #d4a853;
  --text: #f0ede8;
  --text-muted: #9a9490;
  --border: rgba(232, 196, 106, 0.15);
  --card-bg: rgba(255,255,255,0.03);
  --radius: 16px;
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
  --shadow: 0 8px 40px rgba(0,0,0,0.4);
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ===== SELECTION ===== */
::selection { background: var(--accent); color: var(--bg); }

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 5%;
  transition: var(--transition);
}
#navbar.scrolled {
  background: rgba(13,13,15,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 5%;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--text);
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}
.nav-link {
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--accent);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--text);
  transition: var(--transition);
  border-radius: 2px;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== SECTIONS ===== */
section {
  padding: 7rem 5%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

/* ===== SECTION HEADER ===== */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 0.3rem 1rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 2px solid var(--accent);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}
.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  transform: translateY(-2px);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 2px solid var(--border);
  transition: var(--transition);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ===== HOME ===== */
#home {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  min-height: 100vh;
  padding-top: 8rem;
  overflow: hidden;
}
.home-bg-shape {
  position: absolute;
  top: -10%;
  right: -5%;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,196,106,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.home-content { flex: 1; max-width: 580px; }
.home-greeting {
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.home-name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 1.2rem;
  color: var(--text);
}
.home-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.role-tag {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.home-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2.2rem;
  max-width: 480px;
}
.home-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.home-visual {
  flex: 0 0 auto;
  position: relative;
  width: 320px;
  height: 320px;
}
.avatar-ring {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: spin 20s linear infinite;
}
.avatar-inner {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: var(--accent);
  animation: spin 20s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }
.avatar-inner { animation: none; }
.avatar-ring { animation: spin-ring 25s linear infinite; }
@keyframes spin-ring {
  from { transform: translate(-50%,-50%) rotate(0deg); }
  to   { transform: translate(-50%,-50%) rotate(360deg); }
}
.floating-card {
  position: absolute;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  animation: float 3s ease-in-out infinite;
  box-shadow: var(--shadow);
}
.fc1 { top: 8%;  left: -5%;  animation-delay: 0s; }
.fc2 { top: 8%;  right: -5%; animation-delay: 0.8s; }
.fc3 { bottom: 8%; left: -5%;  animation-delay: 1.6s; }
.fc4 { bottom: 8%; right: -5%; animation-delay: 0.4s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* ===== ABOUT ===== */
#about { background: var(--bg2); }
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
}
.about-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
}
.about-card:hover {
  border-color: rgba(232,196,106,0.35);
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.about-icon {
  width: 50px; height: 50px;
  background: rgba(232,196,106,0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.about-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text);
}
.about-card p {
  font-size: 0.93rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}
.about-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.about-list li:last-child { border-bottom: none; }
.about-list strong { color: var(--text); }
.about-list span { font-size: 0.8rem; color: var(--accent); margin-left: 0.4rem; }
.interest-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.interest-tags span {
  background: rgba(232,196,106,0.08);
  border: 1px solid var(--border);
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== SKILLS ===== */
#skills { min-height: auto; padding: 7rem 5%; }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}
.skill-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  transition: var(--transition);
}
.skill-item:hover {
  border-color: rgba(232,196,106,0.35);
  transform: translateX(5px);
}
.skill-icon {
  font-size: 1.8rem;
  color: var(--accent);
  flex-shrink: 0;
  width: 44px;
  text-align: center;
}
.skill-info { flex: 1; }
.skill-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.skill-pct { color: var(--accent); }
.skill-bar {
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.skill-item.animated .skill-fill { width: var(--w); }

/* ===== PROJECTS ===== */
#projects { background: var(--bg2); }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.8rem;
}
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.project-card:hover {
  border-color: rgba(232,196,106,0.35);
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.project-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(232,196,106,0.15);
  line-height: 1;
}
.project-links a {
  width: 36px; height: 36px;
  background: rgba(232,196,106,0.08);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
  font-size: 0.9rem;
}
.project-links a:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text);
}
.project-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
}
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.project-tech span {
  font-size: 0.78rem;
  padding: 0.25rem 0.7rem;
  background: rgba(232,196,106,0.08);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--accent);
}
.project-code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  overflow-x: auto;
}
.project-code code {
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: pre;
  display: block;
  line-height: 1.6;
}

/* ===== CONTACT ===== */
#contact { min-height: auto; }
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
}
.contact-info p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
}
.contact-items { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.contact-item i {
  color: var(--accent);
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px;
}
.social-links { display: flex; gap: 1rem; }
.social-links a {
  width: 42px; height: 42px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: var(--transition);
}
.social-links a:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  transform: translateY(-3px);
}
.contact-form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.form-group { position: relative; }
.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.93rem;
  transition: var(--transition);
  outline: none;
  resize: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,196,106,0.1);
}
.form-group label {
  position: absolute;
  top: -0.6rem;
  left: 1rem;
  background: var(--bg2);
  padding: 0 0.4rem;
  font-size: 0.75rem;
  color: var(--accent);
  display: none;
}
.form-group input:focus + label,
.form-group textarea:focus + label { display: block; }
#form-status {
  font-size: 0.88rem;
  text-align: center;
  min-height: 1.2rem;
}
#form-status.success { color: #6fcf97; }
#form-status.error   { color: #eb5757; }

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-muted);
}
footer span { color: var(--accent); }

/* ===== SCROLL TOP ===== */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px; height: 44px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 999;
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.scroll-top:hover {
  background: var(--accent2);
  transform: translateY(-3px);
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  #home {
    flex-direction: column;
    text-align: center;
    padding-top: 7rem;
  }
  .home-roles, .home-cta { justify-content: center; }
  .home-desc { margin: 0 auto 2rem; }
  .home-visual { width: 260px; height: 260px; }
  .contact-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--bg2);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    border-left: 1px solid var(--border);
    transition: right 0.4s ease;
    z-index: 999;
  }
  .nav-links.open { right: 0; }
  .hamburger { display: flex; z-index: 1000; }
  section { padding: 5rem 6%; }
  .floating-card { display: none; }
  .fc1, .fc2, .fc3, .fc4 { display: none; }
}
