:root {
      --primary-gold: #b8860b;
      --accent-amber: #cd853f;
      --warm-beige: #8b4513;
      --deep-brown: #654321;
      --dark-chocolate: #3e2723;
      --off-white: #faf7f2;
      --light-brown: #f5f0e8;
      --glass-bg: rgba(139, 69, 19, 0.05);
      --glass-border: rgba(184, 134, 11, 0.2);
      --border-main: #d4af37;
    }

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

    html {
      scroll-behavior: smooth;
    }

    body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      background: linear-gradient(135deg, var(--off-white) 0%, var(--light-brown) 100%);
      color: var(--deep-brown);
      min-height: 100vh;
    }

    /* ── Portfolio border wrapper ── */
    .portfolio-wrapper {
      min-height: 100vh;
      margin: 1rem;
      border: 4px solid var(--border-main);
      border-radius: 25px;
      position: relative;
      background: var(--off-white);
      box-shadow:
        0 0 30px rgba(212, 175, 55, 0.3),
        inset 0 0 50px rgba(245, 240, 232, 0.8);
    }

    /* Subtle grid overlay */
    .portfolio-wrapper::before {
      content: '';
      position: absolute;
      inset: 0;
      background-image:
        radial-gradient(circle at 25% 25%, rgba(184, 134, 11, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(205, 133, 63, 0.03) 0%, transparent 50%),
        linear-gradient(90deg, rgba(184, 134, 11, 0.02) 1px, transparent 1px),
        linear-gradient(rgba(184, 134, 11, 0.02) 1px, transparent 1px);
      background-size: 300px 300px, 300px 300px, 80px 80px, 80px 80px;
      border-radius: 21px;
      z-index: 1;
      pointer-events: none;
    }

    /* ── Corner icons ── */
    .corner-icon {
      position: absolute;
      width: 60px;
      height: 60px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.8rem;
      color: var(--primary-gold);
      background: var(--glass-bg);
      border: 2px solid var(--glass-border);
      border-radius: 50%;
      backdrop-filter: blur(10px);
      box-shadow: 0 4px 15px rgba(0,0,0,0.1);
      animation: pulse 3s ease-in-out infinite;
      z-index: 10;
    }
    .corner-icon.top-left    { top: 20px;    left: 20px;  animation-delay: 0s;   }
    .corner-icon.top-right   { top: 20px;    right: 20px; animation-delay: 0.5s; }
    .corner-icon.bottom-left { bottom: 20px; left: 20px;  animation-delay: 1s;   }
    .corner-icon.bottom-right{ bottom: 20px; right: 20px; animation-delay: 1.5s; }

    @keyframes pulse {
      0%, 100% { transform: scale(1);   opacity: 0.8; }
      50%       { transform: scale(1.1); opacity: 1;   }
    }

    /* ── Layout ── */
    .portfolio-content {
      position: relative;
      z-index: 2;
      padding: 2rem;
    }

    .container {
      max-width: 1200px;
      margin: auto;
      padding: 0 1rem;
    }

    /* ── Header ── */
    header {
      text-align: center;
      padding: 4.5rem 2rem 3rem;
      background: var(--glass-bg);
      border: 2px solid var(--glass-border);
      border-radius: 25px;
      margin-bottom: 2rem;
      backdrop-filter: blur(10px);
      box-shadow:
        0 8px 25px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255,255,255,0.2);
    }

    .profile-img {
      width: 180px;
      height: 180px;
      border-radius: 50%;
      object-fit: cover;
      margin-bottom: 1.5rem;
      border: 4px solid var(--primary-gold);
      box-shadow:
        0 0 25px rgba(184,134,11,0.4),
        inset 0 0 10px rgba(0,0,0,0.1);
      transition: transform 0.3s ease;
    }
    .profile-img:hover { transform: scale(1.05); }

    h1 {
      font-size: 3rem;
      color: var(--primary-gold);
      text-shadow: 0 2px 4px rgba(0,0,0,0.1), 0 0 10px rgba(184,134,11,0.3);
      margin-bottom: 0.5rem;
      font-weight: 700;
      letter-spacing: 0.04em;
    }

    .subtitle {
      font-size: 1.25rem;
      color: var(--accent-amber);
      margin-bottom: 1.2rem;
      font-weight: 500;
    }

    .contact-info {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      gap: 1rem 2rem;
      margin-bottom: 1.8rem;
      font-size: 1rem;
      color: var(--deep-brown);
    }

    .contact-item {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
    .contact-item i { color: var(--primary-gold); font-size: 1.1rem; }

    /* ── Social links ── */
    .social-links {
      display: flex;
      justify-content: center;
      gap: 1.5rem;
      margin-top: 1rem;
      flex-wrap: wrap;
    }

    .social-links a {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.4rem;
      padding: 0.55rem 1.1rem;
      background: var(--glass-bg);
      border: 2px solid var(--primary-gold);
      border-radius: 30px;
      color: var(--primary-gold);
      font-size: 0.95rem;
      font-weight: 600;
      text-decoration: none;
      backdrop-filter: blur(10px);
      transition: all 0.3s ease;
      box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    }
    .social-links a:hover {
      transform: translateY(-3px);
      box-shadow: 0 8px 20px rgba(184,134,11,0.3);
      background: rgba(184,134,11,0.1);
    }
    .social-links a i { font-size: 1.1rem; }

    /* ── Nav ── */
    nav {
      position: sticky;
      top: 0;
      background: rgba(250,247,242,0.92);
      backdrop-filter: blur(18px);
      z-index: 1000;
      border: 1px solid var(--glass-border);
      border-radius: 15px;
      margin-bottom: 2rem;
      box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    }

    .nav-links {
      display: flex;
      justify-content: center;
      gap: 2rem;
      list-style: none;
      padding: 1.2rem 1.5rem;
      flex-wrap: wrap;
    }

    .nav-links a {
      text-decoration: none;
      color: var(--deep-brown);
      font-weight: 600;
      font-size: 1rem;
      position: relative;
      transition: all 0.3s ease;
      padding: 0.45rem 0.9rem;
      border-radius: 10px;
      display: flex;
      align-items: center;
      gap: 0.45rem;
    }
    .nav-links a:hover {
      color: var(--primary-gold);
      background: rgba(184,134,11,0.1);
      transform: translateY(-2px);
    }

    /* ── Section titles ── */
    .section-title {
      text-align: center;
      font-size: 2.6rem;
      margin: 2.5rem 0 2rem;
      color: var(--primary-gold);
      text-shadow: 0 2px 4px rgba(0,0,0,0.1), 0 0 10px rgba(184,134,11,0.2);
      position: relative;
      font-weight: 700;
    }
    .section-title::after {
      content: '';
      position: absolute;
      bottom: -10px;
      left: 50%;
      transform: translateX(-50%);
      width: 80px;
      height: 3px;
      background: linear-gradient(90deg, transparent, var(--primary-gold), transparent);
    }

    section { padding: 1rem 0 2rem; }

    /* ── Glass card base ── */
    .glass-card {
      background: var(--glass-bg);
      backdrop-filter: blur(10px);
      border: 2px solid var(--glass-border);
      border-radius: 20px;
      padding: 2.5rem;
      box-shadow: 0 8px 25px rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.3);
      margin-bottom: 2rem;
      position: relative;
    }

    /* ── About ── */
    .about-text p {
      color: var(--deep-brown);
      line-height: 1.85;
      font-size: 1.05rem;
      margin-bottom: 2rem;
      text-align: justify;
    }

    /* ── Skills ── */
    .skills-section { margin-top: 2rem; }
    .skills-group-label {
      font-size: 0.78rem;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--accent-amber);
      margin-bottom: 0.6rem;
      margin-top: 1.4rem;
    }

    .skills {
      display: flex;
      flex-wrap: wrap;
      gap: 0.75rem;
    }

    .skill-tag {
      padding: 0.55rem 1.2rem;
      border-radius: 25px;
      border: 2px solid var(--primary-gold);
      background: var(--glass-bg);
      color: var(--primary-gold);
      font-size: 0.88rem;
      font-weight: 600;
      backdrop-filter: blur(10px);
      transition: all 0.3s ease;
      box-shadow: 0 3px 10px rgba(0,0,0,0.04);
      cursor: default;
    }
    .skill-tag:hover {
      background: rgba(184,134,11,0.12);
      transform: translateY(-3px);
      box-shadow: 0 8px 18px rgba(184,134,11,0.2);
    }

    /* ── Projects ── */
    .projects-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
      gap: 2rem;
    }

    .project-card {
      background: var(--glass-bg);
      backdrop-filter: blur(10px);
      border: 2px solid var(--glass-border);
      border-radius: 20px;
      padding: 2rem;
      box-shadow: 0 8px 25px rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.3);
      transition: transform 0.3s ease, box-shadow 0.3s ease;
      cursor: default;
      display: flex;
      flex-direction: column;
    }
    .project-card:hover {
      transform: translateY(-8px);
      box-shadow: 0 18px 40px rgba(0,0,0,0.1), 0 0 25px rgba(184,134,11,0.15);
    }

    .project-title {
      color: var(--primary-gold);
      font-size: 1.35rem;
      margin-bottom: 0.5rem;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
    .project-title::before { content: '⚡'; font-size: 1.1rem; }

    .project-tech-row {
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
      margin-bottom: 1rem;
    }
    .tech-badge {
      font-size: 0.72rem;
      font-weight: 600;
      padding: 0.2rem 0.6rem;
      border-radius: 20px;
      background: rgba(184,134,11,0.1);
      border: 1px solid rgba(184,134,11,0.35);
      color: var(--warm-beige);
    }

    .project-description {
      color: var(--deep-brown);
      font-size: 0.96rem;
      line-height: 1.7;
      margin-bottom: 1.5rem;
      flex: 1;
    }

    .project-description ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }
    .project-description li {
      position: relative;
      padding-left: 1.5rem;
      margin-bottom: 0.7rem;
    }
    .project-description li::before {
      content: '✦';
      position: absolute;
      left: 0;
      color: var(--primary-gold);
      font-size: 0.8rem;
      top: 0.15rem;
    }

    .project-links {
      display: flex;
      flex-wrap: wrap;
      gap: 0.6rem;
      margin-top: auto;
    }
    .project-links a {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      padding: 0.55rem 1rem;
      background: linear-gradient(135deg, var(--primary-gold), var(--accent-amber));
      color: var(--off-white);
      border-radius: 8px;
      text-decoration: none;
      font-weight: 600;
      font-size: 0.88rem;
      transition: all 0.3s ease;
      box-shadow: 0 3px 10px rgba(184,134,11,0.2);
    }
    .project-links a:hover {
      transform: translateY(-3px);
      box-shadow: 0 8px 20px rgba(184,134,11,0.35);
      background: linear-gradient(135deg, var(--accent-amber), var(--primary-gold));
    }

    /* ── Experience ── */
    .timeline { position: relative; padding-left: 2rem; }
    .timeline::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 3px;
      background: linear-gradient(180deg, var(--primary-gold), var(--accent-amber), transparent);
      border-radius: 2px;
    }

    .timeline-item {
      position: relative;
      margin-bottom: 2rem;
    }
    .timeline-item::before {
      content: '';
      position: absolute;
      left: -2.45rem;
      top: 0.5rem;
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: var(--primary-gold);
      border: 3px solid var(--off-white);
      box-shadow: 0 0 0 2px var(--primary-gold);
    }

    .timeline-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      flex-wrap: wrap;
      gap: 0.3rem;
      margin-bottom: 0.5rem;
    }
    .timeline-role {
      font-size: 1.15rem;
      font-weight: 700;
      color: var(--primary-gold);
    }
    .timeline-company {
      font-size: 0.95rem;
      color: var(--accent-amber);
      font-weight: 600;
    }
    .timeline-date {
      font-size: 0.85rem;
      color: var(--warm-beige);
      font-weight: 600;
      background: rgba(184,134,11,0.1);
      border: 1px solid var(--glass-border);
      padding: 0.2rem 0.7rem;
      border-radius: 20px;
      white-space: nowrap;
    }
    .timeline-body {
      color: var(--deep-brown);
      font-size: 0.97rem;
      line-height: 1.75;
    }
    .timeline-body ul {
      list-style: none;
      padding: 0;
      margin-top: 0.5rem;
    }
    .timeline-body li {
      position: relative;
      padding-left: 1.3rem;
      margin-bottom: 0.4rem;
    }
    .timeline-body li::before {
      content: '▸';
      position: absolute;
      left: 0;
      color: var(--primary-gold);
    }

    /* ── Education ── */
    .edu-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 1.5rem;
    }
    .edu-card {
      background: var(--glass-bg);
      border: 2px solid var(--glass-border);
      border-radius: 16px;
      padding: 1.5rem;
      box-shadow: 0 5px 18px rgba(0,0,0,0.04);
      transition: transform 0.3s ease;
    }
    .edu-card:hover { transform: translateY(-4px); }
    .edu-degree {
      font-size: 1rem;
      font-weight: 700;
      color: var(--primary-gold);
      margin-bottom: 0.3rem;
    }
    .edu-institution {
      font-size: 0.92rem;
      color: var(--accent-amber);
      font-weight: 600;
      margin-bottom: 0.25rem;
    }
    .edu-meta {
      font-size: 0.83rem;
      color: var(--warm-beige);
    }

    /* ── Contact form ── */
    .contact-content {
      background: var(--glass-bg);
      backdrop-filter: blur(10px);
      border: 2px solid var(--glass-border);
      border-radius: 20px;
      padding: 2.5rem;
      box-shadow: 0 8px 25px rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.3);
    }
    .contact-form { max-width: 600px; margin: 0 auto; }
    .form-group { margin-bottom: 1.4rem; }
    .contact-form label {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      color: var(--primary-gold);
      margin-bottom: 0.5rem;
      font-weight: 600;
      font-size: 0.95rem;
    }
    input, textarea {
      width: 100%;
      padding: 0.9rem 1rem;
      background: var(--glass-bg);
      border: 2px solid var(--glass-border);
      border-radius: 12px;
      color: var(--deep-brown);
      font-size: 1rem;
      font-family: inherit;
      backdrop-filter: blur(10px);
      transition: all 0.3s ease;
      box-shadow: inset 0 2px 5px rgba(0,0,0,0.04);
    }
    input:focus, textarea:focus {
      outline: none;
      border-color: var(--primary-gold);
      box-shadow: inset 0 2px 5px rgba(0,0,0,0.04), 0 0 15px rgba(184,134,11,0.2);
    }
    input.input-error, textarea.input-error {
      border-color: #c0392b;
      box-shadow: 0 0 10px rgba(192,57,43,0.2);
    }
    .field-error {
      color: #c0392b;
      font-size: 0.82rem;
      margin-top: 0.3rem;
      display: none;
    }
    .field-error.visible { display: block; }

    .btn {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.9rem 2rem;
      background: linear-gradient(135deg, var(--primary-gold), var(--accent-amber));
      border: none;
      border-radius: 25px;
      color: var(--off-white);
      font-weight: 700;
      font-size: 1rem;
      cursor: pointer;
      transition: all 0.3s ease;
      box-shadow: 0 4px 12px rgba(184,134,11,0.25);
      min-width: 170px;
      justify-content: center;
    }
    .btn:hover:not(:disabled) {
      transform: translateY(-3px);
      box-shadow: 0 8px 22px rgba(184,134,11,0.35);
      background: linear-gradient(135deg, var(--accent-amber), var(--primary-gold));
    }
    .btn:disabled {
      opacity: 0.75;
      cursor: not-allowed;
      transform: none;
    }
    .btn .spinner {
      width: 16px;
      height: 16px;
      border: 2px solid rgba(255,255,255,0.4);
      border-top-color: #fff;
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
      display: none;
    }
    .btn.loading .spinner { display: inline-block; }
    .btn.loading .btn-icon,
    .btn.loading .btn-text { display: none; }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* ── Toast notification ── */
    .toast {
      position: fixed;
      bottom: 2rem;
      right: 2rem;
      min-width: 280px;
      max-width: 360px;
      padding: 1rem 1.4rem;
      border-radius: 14px;
      font-size: 0.95rem;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 0.75rem;
      z-index: 9999;
      box-shadow: 0 10px 35px rgba(0,0,0,0.15);
      transform: translateY(120%);
      opacity: 0;
      transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease;
      pointer-events: none;
    }
    .toast.show {
      transform: translateY(0);
      opacity: 1;
    }
    .toast.success {
      background: linear-gradient(135deg, #1a6b3a, #27ae60);
      color: #fff;
      border: 1px solid rgba(255,255,255,0.2);
    }
    .toast.error {
      background: linear-gradient(135deg, #7b1a1a, #c0392b);
      color: #fff;
      border: 1px solid rgba(255,255,255,0.2);
    }
    .toast-icon { font-size: 1.3rem; flex-shrink: 0; }
    .toast-msg { flex: 1; line-height: 1.4; }

    /* ── Footer ── */
    footer {
      text-align: center;
      padding: 1.8rem 1rem;
      margin-top: 2rem;
      font-size: 0.95rem;
      color: var(--deep-brown);
      background: var(--glass-bg);
      backdrop-filter: blur(10px);
      border: 1px solid var(--glass-border);
      border-radius: 15px;
      box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    }

    /* ── Responsive ── */
    @media (max-width: 768px) {
      .portfolio-wrapper { margin: 0.5rem; }

      .corner-icon { width: 48px; height: 48px; font-size: 1.3rem; }
      .corner-icon.top-left,  .corner-icon.top-right  { top: 14px; }
      .corner-icon.bottom-left,.corner-icon.bottom-right{ bottom: 14px; }
      .corner-icon.top-left, .corner-icon.bottom-left  { left: 14px; }
      .corner-icon.top-right,.corner-icon.bottom-right  { right: 14px; }

      h1 { font-size: 2.1rem; }
      .section-title { font-size: 2rem; }
      .nav-links { gap: 0.6rem; padding: 0.9rem 1rem; }
      .projects-grid { grid-template-columns: 1fr; }
      .project-links { flex-direction: column; }
      .skills { justify-content: center; }
      .contact-info { flex-direction: column; gap: 0.8rem; }
      .contact-item { justify-content: center; }
      .timeline { padding-left: 1.5rem; }
    }

    @media (max-width: 600px) {
      .portfolio-content { padding: 1rem; }
      header { padding: 3rem 1rem 2rem; }
    }


/* ── Expanded project details ── */
.project-card { min-width: 0; }
.project-intro { color: var(--warm-beige); font-weight: 600; margin: 0 0 0.9rem; line-height: 1.6; }
.project-description strong { color: var(--dark-chocolate); }
.project-current { margin-top: 1rem; padding: 1rem 1.1rem; border-left: 3px solid var(--accent-amber); background: rgba(205,133,63,0.08); border-radius: 0 12px 12px 0; }
.project-current h4 { color: var(--warm-beige); font-size: 0.94rem; margin-bottom: 0.55rem; }
.project-current ul { list-style: none; padding: 0; margin: 0; }
.project-current li { position: relative; padding-left: 1.15rem; margin: 0.35rem 0; line-height: 1.55; font-size: 0.9rem; }
.project-current li::before { content: '↗'; position: absolute; left: 0; color: var(--accent-amber); }
.project-card .project-links { margin-top: 1.2rem; }
.project-links a { text-align: center; }
.skills-section { display: grid; gap: 0.9rem; }
.skills-group-label { margin-top: 0.35rem; }
@media (max-width: 600px) { .project-card { padding: 1.35rem; } .project-title { font-size: 1.15rem; } .project-description { font-size: 0.91rem; } }

.nav-links a.active { background: rgba(184,134,11,0.14); color: var(--dark-chocolate); box-shadow: inset 0 -2px 0 var(--primary-gold); }




/* ── Reliable one-slide-at-a-time projects carousel ── */
.projects-carousel { width: 100%; }
.carousel-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; }
.carousel-counter { margin: 0; color: var(--warm-beige); font-weight: 700; letter-spacing: .03em; }
.carousel-buttons { display: flex; gap: .65rem; }
.carousel-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--primary-gold); border-radius: 50%; color: var(--dark-chocolate); background: var(--glass-bg); cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease; }
.carousel-btn:hover:not(:disabled) { color: var(--off-white); background: var(--primary-gold); transform: translateY(-2px); }
.carousel-btn:focus-visible, .carousel-dot:focus-visible { outline: 3px solid var(--accent-amber); outline-offset: 3px; }
.carousel-viewport, .projects-viewport { width: 100%; overflow: hidden; border-radius: 20px; touch-action: pan-y; }
.projects-track { display: flex; width: 100%; overflow: visible; transform: translate3d(0, 0, 0); transition: transform .45s cubic-bezier(.22, .75, .25, 1); will-change: transform; }
.projects-track > .project-card { box-sizing: border-box; flex: 0 0 100%; width: 100%; min-width: 100%; max-width: 100%; scroll-snap-align: unset; scroll-snap-stop: unset; }
.project-card[aria-hidden="true"] { pointer-events: none; }
.carousel-dots { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .55rem; margin-top: 1.15rem; }
.carousel-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 99px; background: rgba(184, 134, 11, .28); cursor: pointer; transition: width .2s ease, background .2s ease; }
.carousel-dot[aria-current="true"] { width: 26px; background: var(--primary-gold); }
.project-description code { padding: .08rem .28rem; border-radius: 4px; background: rgba(184, 134, 11, .1); font-size: .9em; }
.project-links a { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .projects-track, .carousel-btn, .carousel-dot { transition: none; } }
@media (max-width: 600px) { .carousel-toolbar { align-items: center; } .carousel-btn { width: 40px; height: 40px; } .projects-track > .project-card { padding: 1.25rem; } .project-links { flex-direction: column; } .project-links a { width: 100%; } }


/* Office Management System links that have not been published yet */
.project-links .project-link-pending {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: inherit;
  opacity: 0.62;
  cursor: default;
  text-decoration: none;
}
