@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300&family=DM+Sans:wght@300;400;500&display=swap');

/* ── THEMES ── */
:root, [data-theme="dark"] {
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #1a1a24;
  --accent: #c9a84c;
  --accent2: #e8c97a;
  --text: #e8e6e0;
  --text-muted: #8a8880;
  --border: rgba(201, 168, 76, 0.15);
  --card: rgba(255,255,255,0.03);
  --nav-bg: rgba(10,10,15,0.85);
  --input-bg: rgba(255,255,255,0.04);
  --input-border: rgba(201,168,76,0.2);
  --flash-success-bg: rgba(40,180,99,0.12);
  --flash-success-border: rgba(40,180,99,0.4);
  --flash-success-color: #4ade80;
  --flash-error-bg: rgba(220,53,69,0.12);
  --flash-error-border: rgba(220,53,69,0.4);
  --flash-error-color: #f87171;
}

[data-theme="light"] {
  --bg: #f8f6f1;
  --bg2: #eeece7;
  --bg3: #e4e2dd;
  --accent: #9a6f1e;
  --accent2: #b8882a;
  --text: #1a1814;
  --text-muted: #6b6560;
  --border: rgba(154, 111, 30, 0.2);
  --card: rgba(0,0,0,0.03);
  --nav-bg: rgba(248,246,241,0.9);
  --input-bg: rgba(0,0,0,0.04);
  --input-border: rgba(154,111,30,0.3);
  --flash-success-bg: rgba(40,180,99,0.1);
  --flash-success-border: rgba(40,180,99,0.5);
  --flash-success-color: #16a34a;
  --flash-error-bg: rgba(220,53,69,0.1);
  --flash-error-border: rgba(220,53,69,0.5);
  --flash-error-color: #dc2626;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  transition: background 0.4s, color 0.4s;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

[data-theme="dark"] body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 4rem;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s;
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-transform: uppercase;
}

.nav-links { display: flex; gap: 2.5rem; list-style: none; }

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--accent); }

/* ── THEME TOGGLE ── */
.theme-toggle {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--accent);
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.3s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 8rem 4rem 4rem;
  text-align: center;
  overflow: hidden;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}
.orb1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(201,168,76,0.12) 0%, transparent 70%);
  top: -100px; left: 50%;
  transform: translateX(-50%);
  animation: float 8s ease-in-out infinite;
}
.orb2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(100,80,200,0.08) 0%, transparent 70%);
  bottom: 0; right: -100px;
  animation: float 10s ease-in-out infinite reverse;
}
@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-30px); }
}

.hero-content { position: relative; z-index: 1; }

/* ── HERO PHOTO ── */
.hero-photo-wrapper {
  margin: 0 auto 2rem;
  width: 130px; height: 130px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow: 0 0 30px rgba(201,168,76,0.3);
  overflow: hidden;
  animation: fadeUp 0.8s ease both;
}
.hero-photo {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-photo-placeholder {
  width: 100%; height: 100%;
  background: var(--bg3);
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--accent);
}

/* ── HERO SOCIAL ── */
.hero-social {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin: 1.5rem 0;
  animation: fadeUp 0.8s ease 0.5s both;
}
.social-btn {
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.3s;
}
.social-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

.hero-tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  margin-bottom: 2rem;
  animation: fadeUp 0.8s ease 0.1s both;
}
.hero-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.02em;
  animation: fadeUp 0.8s ease 0.2s both;
}
.hero-name span { color: var(--accent); font-style: italic; }

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-top: 1.5rem;
  animation: fadeUp 0.8s ease 0.4s both;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  animation: fadeUp 0.8s ease 0.6s both;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  padding: 0.9rem 2.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  font-weight: 500;
  transition: all 0.3s;
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-2px); }

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.9rem 2.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  transition: all 0.3s;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.scroll-hint {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: fadeUp 1s ease 1s both;
}
.scroll-line {
  width: 1px; height: 50px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── SECTIONS ── */
section { padding: 6rem 4rem; position: relative; z-index: 1; }

.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 3rem;
}
.section-title em { font-style: italic; color: var(--accent); }

.divider {
  width: 60px; height: 1px;
  background: var(--accent);
  margin-bottom: 3rem;
}

/* ── ABOUT ── */
#about { background: var(--bg2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}
.about-text p { color: var(--text-muted); line-height: 1.9; font-size: 1rem; margin-bottom: 1.5rem; }

.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2rem; }

.stat-card {
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 8px;
  background: var(--card);
  transition: border-color 0.3s;
}
.stat-card:hover { border-color: var(--accent); }
.stat-num { font-family: 'Cormorant Garamond', serif; font-size: 2.5rem; color: var(--accent); font-weight: 300; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); letter-spacing: 0.05em; margin-top: 0.3rem; }

.about-visual { position: relative; }

.about-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}
.about-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

/* ── LANGUAGES ── */
.lang-grid { display: flex; flex-direction: column; gap: 1.2rem; margin-top: 1rem; }
.lang-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.85rem; }
.lang-name { color: var(--text); }
.lang-level { color: var(--accent); font-size: 0.75rem; }
.lang-bar { height: 2px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.lang-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 2px; transition: width 1.5s ease; }

/* ── SKILLS ── */
#skills { max-width: 1100px; margin: 0 auto; }

.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.skill-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  transition: all 0.3s;
}
.skill-group:hover { border-color: var(--accent); transform: translateY(-4px); }
.skill-group-icon { font-size: 1.5rem; margin-bottom: 1rem; }
.skill-group-title { font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.2rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tag {
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.2);
  color: var(--text);
  font-size: 0.75rem;
  padding: 0.35rem 0.8rem;
  border-radius: 4px;
  transition: all 0.2s;
}
.skill-tag:hover { background: rgba(201,168,76,0.18); color: var(--accent); }

/* ── EXPERIENCE ── */
#experience { background: var(--bg2); }

.exp-wrapper { max-width: 900px; margin: 0 auto; }
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}
.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 2rem;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.6s ease;
}
.timeline-item.visible { opacity: 1; transform: translateX(0); }
.timeline-dot {
  position: absolute;
  left: -2.4rem; top: 0.4rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg2);
  box-shadow: 0 0 10px rgba(201,168,76,0.4);
}
.timeline-period { font-size: 0.72rem; letter-spacing: 0.15em; color: var(--accent); text-transform: uppercase; margin-bottom: 0.4rem; }
.timeline-title { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; font-weight: 400; margin-bottom: 0.2rem; }
.timeline-company { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1rem; }
.timeline-tasks { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.timeline-tasks li { font-size: 0.88rem; color: var(--text-muted); padding-left: 1rem; position: relative; line-height: 1.6; }
.timeline-tasks li::before { content: '→'; position: absolute; left: 0; color: var(--accent); font-size: 0.75rem; }

/* ── PROJECTS ── */
#projects { max-width: 1200px; margin: 0 auto; }

.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s, box-shadow 0.3s;
}
.project-card.visible { opacity: 1; transform: translateY(0); }
.project-card:hover { border-color: var(--accent); box-shadow: 0 20px 60px rgba(0,0,0,0.2); transform: translateY(-6px); }
.project-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transition: transform 0.4s;
}
.project-card:hover::after { transform: scaleX(1); }
.project-type { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; }
.project-year { font-size: 0.7rem; color: var(--text-muted); float: right; }
.project-title { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 400; margin-bottom: 0.8rem; clear: both; line-height: 1.3; }
.project-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1.2rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.project-tag { font-size: 0.68rem; padding: 0.25rem 0.6rem; border: 1px solid var(--border); border-radius: 3px; color: var(--text-muted); letter-spacing: 0.05em; }

/* ── EDUCATION ── */
#education { background: var(--bg2); }

.edu-wrapper { max-width: 800px; margin: 0 auto; }
.edu-grid { display: flex; flex-direction: column; gap: 1.5rem; }
.edu-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  transition: all 0.3s;
}
.edu-card:hover { border-color: var(--accent); transform: translateX(8px); }
.edu-degree { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 400; margin-bottom: 0.3rem; }
.edu-school { font-size: 0.82rem; color: var(--text-muted); }
.edu-year { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; color: var(--accent); white-space: nowrap; margin-left: 2rem; }

/* ── CONTACT ── */
#contact { background: var(--bg2); }

.contact-wrapper { max-width: 1000px; margin: 0 auto; text-align: center; }

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  margin-top: 3rem;
  text-align: left;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--text);
  padding: 0.8rem;
  border-radius: 8px;
  transition: background 0.2s;
}
.contact-item:hover { background: var(--card); }
.contact-item:hover .contact-icon { background: var(--accent); color: var(--bg); border-color: var(--accent); }

.contact-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--accent);
  transition: all 0.3s;
}
.contact-label { font-size: 0.68rem; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.2; }
.contact-value { font-size: 0.85rem; color: var(--text); }

/* ── CONTACT FORM ── */
.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-group label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  outline: none;
  transition: border-color 0.3s;
  resize: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); opacity: 0.6; }
.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }

/* ── FLASH MESSAGES ── */
.flash {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 1.4rem;
  border-radius: 8px;
  font-size: 0.88rem;
  margin: 1.5rem auto;
  max-width: 600px;
  border: 1px solid;
}
.flash-success {
  background: var(--flash-success-bg);
  border-color: var(--flash-success-border);
  color: var(--flash-success-color);
}
.flash-error {
  background: var(--flash-error-bg);
  border-color: var(--flash-error-border);
  color: var(--flash-error-color);
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-social { display: flex; gap: 1rem; }
.footer-social a {
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.3s;
}
.footer-social a:hover { border-color: var(--accent); color: var(--accent); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav { padding: 1.2rem 2rem; }
  .nav-links { gap: 1.2rem; }
  section { padding: 4rem 2rem; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .edu-card { flex-direction: column; }
  .edu-year { margin-left: 0; margin-top: 0.5rem; }
  .contact-layout { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 1rem; text-align: center; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .hero-name { font-size: 3.5rem; }
}
