/* Base Variables */
:root {
  --bg: #FFFFFF;
  --fg: #000000;
  --gray: #F5F5F7;
  --accent: #007aff;
  --accent-hover: #c0cddb;
  --shadow: rgba(0, 0, 0, 0.1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* 1) Make every element include padding & border in its width */
*,
*::before,
*::after {
box-sizing: border-box;
}

/* 2) Hide any horizontal overflow */
html, body {
overflow-x: hidden;
width: 100%;
}

#home {
will-change: opacity, transform;
}

/* Global Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-sans); color: var(--fg); background: var(--bg); line-height: 1.6; }
a { color: var(--fg); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--accent-hover); }
img, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-weight: 600; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate {
  opacity: 0;
  animation: fadeUp 0.6s forwards;
}

/* 2. Staggered delays for hero children */
#home > .animate:nth-child(1) { animation-delay: 0.1s; } /* hero-img */
#home > .animate:nth-child(2) { animation-delay: 0.2s; } /* h1 */
#home > .animate:nth-child(3) { animation-delay: 0.3s; } /* p */
#home > .animate:nth-child(4) { animation-delay: 0.4s; } /* .btn */
#home > .animate:nth-child(5) { animation-delay: 0.5s; } /* .scroll-down */

/* Navigation */
header {
background: var(--bg);
position: sticky;
top: 0;
z-index: 100;
border-bottom: 1px solid #E1E1E3;
}
.nav-container {
max-width: 900px;
margin: 0 auto;
padding: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
position: relative;    /* for absolute menu on mobile */
}

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
display: none;
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
}

/* Desktop menu */
.nav-list {
list-style: none;
display: flex;
gap: 2rem;
}
.nav-list li a {
font-size: 0.9rem;
text-transform: uppercase;
letter-spacing: 1px;
transition: color 0.3s;
}
.nav-list li a:hover {
color: var(--accent-hover);
}

/* Mobile styles */
@media (max-width: 768px) {
/* show hamburger */
.nav-toggle {
  display: block;
}
/* hide desktop list */
.nav-list {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
/* when open, display vertically */
.nav-list.open {
  display: flex;
}
.nav-list li {
  margin-bottom: 1rem;
}
.nav-list li:last-child {
  margin-bottom: 0;
}
}




/* Hero Section */

/* 1) Reveal animation */
@keyframes fadeUp {
from { opacity: 0; transform: translateY(20px); }
to   { opacity: 1; transform: translateY(0); }
}
.animate {
opacity: 0;
animation: fadeUp 0.6s forwards;
}

/* 2) Stagger only the children of .hero-content */
#home .hero-content .animate:nth-child(1) { animation-delay: 0.1s; } /* .hero-img */
#home .hero-content .animate:nth-child(2) { animation-delay: 0.2s; } /* h1 */
#home .hero-content .animate:nth-child(3) { animation-delay: 0.3s; } /* p */
#home .hero-content .animate:nth-child(4) { animation-delay: 0.4s; } /* .btn */

/* 3) And finally the arrow */
#home .scroll-down.animate { animation-delay: 0.5s; }


/* 4) Your existing hero layout */
.hero {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding: 2rem 1rem;
height: 80vh;
background: linear-gradient(135deg, var(--gray), #fff);
position: relative;       /* <-- makes scroll-down position:absolute work */
overflow-x: hidden;
will-change: opacity;
}

/* Wrapper for fade/scale */
.hero-content {
position: relative;
z-index: 1;
transform-origin: center top;
will-change: transform, opacity;
display: flex;
flex-direction: column;
align-items: center;    /* ← this will center everything (img, h1, p, button) */
text-align: center;      /* ← keeps your text centered too */
}

/* — the rest of your hero rules — */
.hero-img {
width: 160px; height: 160px;
background: var(--accent);
border-radius: 50%;
overflow: hidden;
margin-bottom: 0.5rem;
}
.hero-img img {
width: 100%; height: 100%;
object-fit: cover;
object-position: 50% 10%;
display: block;
border-radius: 50%;
}
.hero h1 { font-size: 3rem; margin-bottom: 0.5rem; }
.hero p {
font-size: 1.25rem; color: #555;
margin-bottom: 1.5rem; max-width: 600px;
}
.btn {
padding: 0.75rem 1.5rem;
background: var(--accent); color: #fff;
border: none; border-radius: 8px;
font-size: 1rem;
transition: background 0.3s, transform 0.3s;
}
.btn:hover { transform: translateY(-3px);  }


/* 5) Arrow stays at bottom of the full hero */
.scroll-down {
position: absolute;
bottom: 2rem;
font-size: 2rem;
color: var(--accent);
animation: bounce 2s infinite;
}
@keyframes bounce {
0%,20%,50%,80%,100% { transform: translateY(0); }
40% { transform: translateY(-10px); }
60% { transform: translateY(-5px); }
}



/* Section Titles */
.section { max-width: 900px; margin: 4rem auto; padding: 0 1rem; }
.section h2 { font-size: 2rem; margin-bottom: 1.5rem; border-bottom: 2px solid var(--accent); display: inline-block; padding-bottom: 0.25rem; }

/* CV Layout */

/* Top row: Education & Experience */
.cv-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Bottom row: smaller sections */
.cv-secondary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

/* Column wrapper */
.cv-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Section title */
.cv-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0rem;
}

/* Entry cards */
.cv-entry {
  background: var(--gray);
  padding: 0.75rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s;
}
.cv-entry:hover {
  box-shadow: 0 4px 12px var(--shadow);
}

.cv-entry-header h4 {
  margin-bottom: 0.5em; /* same as browser default for h3 */
}


/* Headings & dates inside cards */
.cv-entry h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}
.cv-entry time {
  display: block;
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 0.5rem;
}

.cv-entry time > a {
  color: inherit;
  text-decoration: none;
}


/* Paragraphs inside cards */
.cv-entry p {
  font-size: 0.9rem;
  color: #555;
  margin-left: 0; /* flush with card padding */
}

/* Lists inside cards (including languages and awards) */
.cv-entry ul {
  font-size: 0.9rem;
  color: #555;
  margin-left: 1rem;   /* indent */
  list-style: disc;    /* standard bullet */
}

.buzzwords {
  font-style: italic;
  color: #555;
  margin-top: .5rem;
}

/* DETAILS wrapper around UL */
.cv-bullets {
  margin-top: 0.75rem;
}

/* Style the summary toggle */
.cv-bullets summary {
  list-style: none;
  cursor: pointer;
  font-weight: 500;
  color: #007aff;
  position: relative;
  padding-left: 0.5rem;
}
.cv-bullets summary::marker {
  /* hide default marker */
  display: none;
}

.cv-bullets[open] summary::before {
  transform: rotate(90deg);
}

/* Ensure the UL inside details is styled normally */
.cv-bullets ul {
  margin: 0.5rem 0 0 1.25rem;
  padding: 0;
}
.cv-bullets li {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

/* (Optional) Smooth open/close animation */
.cv-bullets ul {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.cv-bullets[open] ul {
  max-height: 500px; /* large enough to show all items */
}



/* Awards list (if you want a colored dot instead of default bullet) */
.awards-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.awards-list li {
  position: relative;
  padding-left: 1.2em;
  margin-bottom: 0.5rem;
}
.awards-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.5em;
  height: 0.5em;
  background: var(--accent);
  border-radius: 50%;
}

/* Fade‑in animation */
.animate {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.6s forwards;
}
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Languages “skill bars” */
.languages {
  padding-top: 0.5rem;   /* give the bars some breathing room */
}

.language-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.lang-name {
  flex: 0 0 4rem;
  font-weight: 500;
}

.lang-bar {
  flex: 1;
  height: 0.5rem;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.lang-level {
  width: 0;
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 1s ease-out;
  /* will animate on load */
}

/* Optional: show the numeric/label on the right */
.lang-label {
  flex: 0 0 3rem;
  text-align: right;
  font-size: 0.8rem;
  color: #777;
}

/* Trigger the bar fill after the entry has faded in */
.animate.languages .language-item:nth-child(1) .lang-level {
  animation: fillBar 1s forwards 0.6s;
}
.animate.languages .language-item:nth-child(2) .lang-level {
  animation: fillBar 1s forwards 0.8s;
}
.animate.languages .language-item:nth-child(3) .lang-level {
  animation: fillBar 1s forwards 1s;
}

@keyframes fillBar {
  to { width: var(--level); }
}

/* You can stagger delays by adding inline style="animation-delay:0.2s" etc. to each .animate */


/* Projects */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; align-items: start;}
.card { border: 1px solid #E1E1E3; border-radius: 12px; overflow: hidden; background: var(--bg); transition: transform 0.3s, box-shadow 0.3s; }
.card:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 4px 12px var(--shadow); }
.media { width: 100%; height: 200px; background: #DDD; display: flex; justify-content: center; align-items: center; color: #888; font-size: 1rem; }
.content { padding: 1rem; }
.content h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.content p { font-size: 0.9rem; color: #555; }
.project-detail {
  margin-top: 0.5rem;
}
.project-detail summary {
  cursor: pointer;
  list-style: none;               /* remove arrow if you don’t want it */
  font-weight: 500;
  color: var(--accent);
}
.project-detail summary::-webkit-details-marker {
  display: none;                  /* hide default marker in WebKit */
}
.project-detail summary::before {
  content: "▶ ";
  display: inline-block;
  transition: transform 0.2s;
}
.project-detail[open] summary::before {
  transform: rotate(90deg);
}
.project-detail p {
  margin-top: 0.75rem;
  color: #555;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Hide the detail-content by default */
.detail-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: 
    max-height 0.4s ease, 
    opacity     0.4s ease 0.1s; /* small delay on fade */
}

/* When open, slide down & fade in */
.project-detail[open] .detail-content {
  max-height: 500px;    /* large enough to fit your text */
  opacity: 1;
}

/* Tweak summary arrow */
.project-detail summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 0.5em;
  transform-origin: center;
  transition: transform 0.2s ease;
}
.project-detail[open] summary::before {
  transform: rotate(90deg);
}

/* Optional: animate the summary text color on hover */
.project-detail summary:hover {
  color: var(--accent);
}

/* Contact & Footer CSS */

/* Contact Grid: two columns on desktop, one on mobile */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 0rem;
  margin-bottom: 2rem;  
}

/* Contact form styling (left column) */
.contact-form {
  max-width: 2000px;
  margin: 0;                /* remove auto centering */
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-group label {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  display: block;
}
.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  width: 100%;
}
.contact-form .btn {
  align-self: flex-start;
  margin-top: 0.5rem;
}

/* Direct contact info (right column) */
.contact-info {
  max-width: 600px;
  margin: 0;                /* remove auto centering */
  font-size: 0.9rem;
  color: #555;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.contact-info a {
  color: var(--accent);
  text-decoration: underline;
}

/* Footer styling */
.footer {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--gray-light, #f5f5f7);
  font-size: 0.8rem;
  color: #777;
}


/* Reuse your fade‑in for form & info blocks */
.animate {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.6s forwards;
}




