/* style.css */

:root {
  --bg: #ede0d4;
  --card: #e6ccb2;
  --border: #d3b6ab;
  --text: #f9f5f3;
  --muted: #ddb892;
  --hover: #b08968;
  --button: #7f5539;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  display: flex;
  overflow-x: hidden;
}

/* CUSTOM CURSOR */

.cursor {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(237, 224, 212, 1);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: transform 0.1s ease;
  backdrop-filter: invert(1);
}

/* SIDEBAR */

.sidebar {
  width: 110px;
  height: 100vh;
  border-right: 1px solid var(--border);
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 0;
  background: #7f5539;
  backdrop-filter: blur(12px);
  z-index: 1000;
}

.logo {
  display: flex;
  flex-direction: column;
  font-size: 3rem;
  font-family: 'Cormorant Garamond', serif;
  line-height: 0.8;
  padding-bottom: 50px;
}
.logo-img {
  height: 50px;
  width: 50px;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 50px;
}

.navbar a {
  width: 70px;
  height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.75rem;
  transition: 0.3s;
}

nav a i {
  font-size: 1.1rem;
}

nav a:hover {
  background: #aa8b7e;
  color: #9c6b4a;
  transform: translateY(-3px);
  filter: brightness(1.05);
  box-shadow: 0 8px 20px rgba(127, 85, 57, 0.15);
  border-radius: 20px 50px 50px 50px;
}

/* MAIN */

.main-content {
  width: calc(100% - 110px);
  margin-left: 110px;
  padding: 30px;
}

/* SECTIONS */

.section {
  margin-bottom: 30px;
}

.hero,
.content-card {
  border: 1px solid var(--border);
  background: linear-gradient(to bottom right, #b08969, #ddb892);
  position: relative;
  overflow: hidden;
}

/* HERO */

.hero {
  min-height: 92vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.hero-content {
  padding: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
}

.mini-title {
  color: #e6ccb2;
  letter-spacing: 4px;
  margin-bottom: 25px;
  font-size: 0.75rem;
}

.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 6rem;
  line-height: 0.9;
  font-weight: 500;
  margin-bottom: 30px;
}

.hero-text {
  max-width: 420px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 35px;
}

.hero-image {
  height: 100%;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
}

/* BUTTON */

.btn {
  width: fit-content;
  padding: 16px 28px;
  background: var(--button);
  border: 1px solid #d3b6ab;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: 0.35s;
  letter-spacing: 1px;
  font-size: 0.8rem;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-4px);
  background: #9c6b4a;
  filter: brightness(1.05);
  box-shadow: 0 8px 20px rgba(127, 85, 57 0.15);
}

.secondary {
  margin-top: 25px;
}

/* CONTENT CARDS */

.content-card {
  padding: 60px;
}

/* ABOUT */

#about {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 60px;
  align-items: center;
}

.card-image img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.card-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  font-weight: 500;
  max-width: 600px;
  margin: 20px 0;
}

.card-content p {
  max-width: 560px;
  line-height: 1.9;
  color: var(--text);
}

.section-tag {
  letter-spacing: 4px;
  font-size: 0.75rem;
  color: var(--text);
}

/* BLOG */

.blog-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 60px;
}

.blog-left h2,
.project-left h2,
.contact-left h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  font-weight: 500;
  margin: 20px 0;
}

.blog-left p,
.project-left p,
.contact-left p {
  line-height: 1.9;
  color: var(--text);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.blog-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  margin-bottom: 20px;
}

.blog-card span {
  font-size: 0.7rem;
  color: #777;
  letter-spacing: 2px;
}

.blog-card h3 {
  margin-top: 12px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem;
  font-weight: 400;
}

/* PROJECT */

.project-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 60px;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}

.project-card {
  position: relative;
  overflow: hidden;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 1s;
}

.project-card:hover img {
  transform: scale(1.08);
}

.large {
  height: 650px;
}

.project-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.small {
  height: 315px;
}

.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 30px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.overlay h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  margin-bottom: 6px;
}

.overlay p {
  color: #f0e5e1;
}

/* CONTACT */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 60px;
  align-items: center;
}

.contact-right {
  border-left: 1px solid var(--border);
  padding-left: 60px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
  color: red;
}

.contact-item i {
  font-size: 1.3rem;
}

/* FOOTER */

.footer {
  border: 1px solid var(--border);
  background: linear-gradient(to bottom right, #b08969, #ddb892);
  padding: 25px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.footer p {
  color: #f9f5f3;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

.footer-links {
  display: flex;
  gap: 30px;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.8rem;
  transition: 0.3s;
}

.footer-links a:hover {
  background: #6b4226;
}

/* REVEAL */

.reveal {
  opacity: 0;
  transform: translateY(80px);
  transition: 1s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE */

@media (max-width: 1200px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-image {
    height: 600px;
  }

  .blog-layout,
  .project-layout,
  #about,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .contact-right {
    border-left: none;
    padding-left: 0;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 80px;
  }

  .main-content {
    width: calc(100% - 80px);
    margin-left: 80px;
    padding: 15px;
  }

  .navbar a {
    width: 58px;
    height: 58px;
    transition:
      color 0.3s ease,
      transform 0.3s ease;
  }

  .hero-content {
    padding: 50px 35px;
  }

  .hero h1 {
    font-size: 4rem;
  }

  .content-card {
    padding: 35px;
  }

  .card-content h2,
  .blog-left h2,
  .project-left h2,
  .contact-left h2 {
    font-size: 2.4rem;
  }
}

/* --------- ICONS ---------- */
.line-md--home {
  display: inline-block;
  width: 24px;
  height: 24px;
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath stroke-dasharray='18' d='M4.5 21.5h15'%3E%3Canimate fill='freeze' attributeName='stroke-dashoffset' dur='0.9s' values='18;0'/%3E%3C/path%3E%3Cpath stroke-dasharray='16' stroke-dashoffset='16' d='M4.5 21.5v-13.5M19.5 21.5v-13.5'%3E%3Canimate fill='freeze' attributeName='stroke-dashoffset' begin='0.9s' dur='0.9s' to='0'/%3E%3C/path%3E%3Cpath stroke-dasharray='28' stroke-dashoffset='28' d='M2 10l10 -8l10 8'%3E%3Canimate fill='freeze' attributeName='stroke-dashoffset' begin='1.8s' dur='1.2s' to='0'/%3E%3C/path%3E%3Cpath stroke-dasharray='26' stroke-dashoffset='26' d='M9.5 21.5v-9h5v9'%3E%3Canimate fill='freeze' attributeName='stroke-dashoffset' begin='2.7s' dur='1.8s' to='0'/%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
  background-color: currentColor;
  -webkit-mask-image: var(--svg);
  mask-image: var(--svg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.line-md--person {
  display: inline-block;
  width: 24px;
  height: 24px;
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath stroke-dasharray='22' d='M12 5c1.66 0 3 1.34 3 3c0 1.66 -1.34 3 -3 3c-1.66 0 -3 -1.34 -3 -3c0 -1.66 1.34 -3 3 -3Z'%3E%3Canimate fill='freeze' attributeName='stroke-dashoffset' dur='1.5s' values='22;0'/%3E%3C/path%3E%3Cpath stroke-dasharray='38' stroke-dashoffset='38' d='M12 14c4 0 7 2 7 3v2h-14v-2c0 -1 3 -3 7 -3Z'%3E%3Canimate fill='freeze' attributeName='stroke-dashoffset' begin='1.5s' dur='1.5s' to='0'/%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
  background-color: currentColor;
  -webkit-mask-image: var(--svg);
  mask-image: var(--svg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.line-md--file {
  display: inline-block;
  width: 24px;
  height: 24px;
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath fill='none' stroke-dasharray='62' d='M13.5 3l5.5 5.5v11.5c0 0.55 -0.45 1 -1 1h-12c-0.55 0 -1 -0.45 -1 -1v-16c0 -0.55 0.45 -1 1 -1Z'%3E%3Canimate fill='freeze' attributeName='stroke-dashoffset' dur='1.8s' values='62;0'/%3E%3C/path%3E%3Cpath fill='%23000' d='M14 3.5l0 4.5l4.5 0Z' opacity='0'%3E%3Cset fill='freeze' attributeName='opacity' begin='1.8s' to='1'/%3E%3Canimate fill='freeze' attributeName='d' begin='1.8s' dur='0.6s' values='M14 3.5l2.25 2.25l2.25 2.25Z;M14 3.5l0 4.5l4.5 0Z'/%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
  background-color: currentColor;
  -webkit-mask-image: var(--svg);
  mask-image: var(--svg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.line-md--folder {
  display: inline-block;
  width: 24px;
  height: 24px;
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath stroke-dasharray='62' d='M12 7h8c0.55 0 1 0.45 1 1v10c0 0.55 -0.45 1 -1 1h-16c-0.55 0 -1 -0.45 -1 -1v-11Z'%3E%3Canimate fill='freeze' attributeName='stroke-dashoffset' dur='1.8s' values='62;0'/%3E%3C/path%3E%3Cpath d='M12 7h-9v-1c0 -0.55 0.45 -1 1 -1h6Z' opacity='0'%3E%3Cset fill='freeze' attributeName='opacity' begin='1.8s' to='1'/%3E%3Canimate fill='freeze' attributeName='d' begin='1.8s' dur='0.6s' values='M12 7h-9v0c0 0 0.45 0 1 0h6Z;M12 7h-9v-1c0 -0.55 0.45 -1 1 -1h6Z'/%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
  background-color: currentColor;
  -webkit-mask-image: var(--svg);
  mask-image: var(--svg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
.line-md--email {
  display: inline-block;
  width: 24px;
  height: 24px;
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath stroke-dasharray='66' d='M4 5h16c0.55 0 1 0.45 1 1v12c0 0.55 -0.45 1 -1 1h-16c-0.55 0 -1 -0.45 -1 -1v-12c0 -0.55 0.45 -1 1 -1Z'%3E%3Canimate fill='freeze' attributeName='stroke-dashoffset' dur='1.8s' values='66;0'/%3E%3C/path%3E%3Cpath stroke-dasharray='24' stroke-dashoffset='24' d='M3 6.5l9 5.5l9 -5.5'%3E%3Canimate fill='freeze' attributeName='stroke-dashoffset' begin='1.8s' dur='0.9s' to='0'/%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
  background-color: currentColor;
  -webkit-mask-image: var(--svg);
  mask-image: var(--svg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

/* The Active Indicator (Vertical line) */
.sidebar .navbar a::before {
  content: '';
  position: absolute;
  left: -15px; /* Pulls it to the very edge of the sidebar */
  top: 10%;
  height: 80%;
  width: 4px;
  background: #007bff; /* Your active color */
  border-radius: 0 4px 4px 0;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.sidebar nav a.active {
  color: #6b4226; /* Active color for text */
}

.sidebar nav a.active::before {
  transform: scaleX(1);
}

/* CONTACT FORM STYLING */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

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

.form-group label {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
  background: var(--card);
  border: 1px solid var(--border);
  color: #777;
  padding: 1rem;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
}

/* Hover & Focus States */
.form-group input:hover,
.form-group textarea:hover {
  background: var(--hover);
  border-color: var(--muted);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--text);
  background: var(--hover);
}

/* Ensure the button matches your studio style */

.contact-form .btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* Match the layout for your contact section */
.contact-right {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* --- Desktop Setup for your Hamburger (Hidden by default) --- */
.hamburger {
  display: none; /* Hidden on large monitors */
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001; /* Keeps button clickable above everything else */
}

.hamburger .line {
  width: 100%;
  height: 3px;
  background-color: #fff; /* Match your color theme */
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

/* --- Mobile Responsive Media Query (< 768px) --- */
@media screen and (max-width: 768px) {
  /* Prevent the parent body from scrolling while menus are active */
  body {
    overflow: hidden;
  }
  /* Transform sidebar into a thin horizontal header strip */
  .sidebar {
    width: 100%;
    height: 70px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  /* Reset layout spacing for logo element */
  .logo {
    padding-bottom: 0;
  }

  /* Make the hamburger button visible */
  .hamburger {
    display: flex;
  }

  /* Hide navbar off-screen cleanly above the viewport */
  .navbar {
    position: fixed;
    /* Use standard percentage fallback for mobile viewport calculation bugs */
    top: -100%;
    left: 0;
    width: 100%;
    /* Use dvh (dynamic viewport height) if supported, fallback to 100% */
    height: 100%;
    height: 100dvh;
    background: #7f5539;
    display: flex; /* Force re-declaration for mobile engines */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transition: top 0.4s ease-in-out;
    z-index: 1999;
  }

  /* Active Class: Slides the navbar down into view */
  .navbar.active {
    top: 0; /* Let it cover the whole viewport on mobile screens */
    padding-top: 70px; /* Push links down below the sticky header bar height */
  }

  /* Adjust navigation item sizes for easier mobile tapping */
  .navbar a {
    width: 100%;
    max-width: 200px;
    height: auto;
    padding: 12px;
  }

  /* Hamburger to "X" Morph Animations */
  .hamburger.active .line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .hamburger.active .line:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
  }

  .hamburger.active .line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
}

/* --- Desktop Layout Setup --- */
.main-content {
  /* Shift content exactly 110px to the right so it never sits behind the sidebar */
  margin-left: 110px;
  padding: 40px;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
  background-color: var(--background); /* Adjust to match your theme */
}

/* --- Mobile Responsive Rules (< 768px) --- */
@media screen and (max-width: 768px) {
  .main-content {
    /* Clear the side margin because the sidebar shifted to a top bar */
    margin-left: 0;

    /* Push content down 70px so it isn't hidden under the sticky mobile header */
    padding-top: 110px;
    padding-left: auto;
    padding-right: auto;
  }
}
