/* ==========================================================================
   GLOBAL VARIABLES & CONFIGURATIONS
   ========================================================================== */
:root {
    --bg-primary: #0a0a0a;
    /* Deep charcoal ink */
    --bg-secondary: #121111;
    /* Warm dark wood */
    --bg-card: rgba(22, 20, 20, 0.85);
    --bg-glass: rgba(10, 10, 10, 0.9);
    --border-glass: rgba(212, 175, 55, 0.15);
    /* Muted gold border */
    --border-glass-focus: rgba(184, 29, 36, 0.7);
    /* Red hot sword slash */

    --text-primary: #f5f5f7;
    /* Off-white paper */
    --text-secondary: #c5c2be;
    /* Stone smoke */
    --text-muted: #807a75;
    /* Slate dust */

    /* Samurai Gradients */
    --accent-gradient: linear-gradient(135deg, #bd1c24 0%, #70060a 100%);
    /* Crimson blood */
    --accent-gradient-hover: linear-gradient(135deg, #d62229 0%, #990f14 100%);
    --pink-gradient: linear-gradient(135deg, #dfa837 0%, #aa7c11 100%);
    /* Gold gradient */
    --card-gradient: linear-gradient(180deg, rgba(184, 29, 36, 0.08) 0%, rgba(0, 0, 0, 0) 100%);

    --accent-color: #bd1c24;
    /* Crimson Red */
    --accent-color-glow: rgba(189, 28, 36, 0.3);
    --gold-color: #d4af37;

    --font-heading: 'Cinzel', 'Noto Serif JP', serif;
    --font-body: 'Inter', 'Noto Serif JP', sans-serif;

    --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    --header-height: 80px;
    --border-radius-sm: 4px;
    /* Sharp corners like a katana */
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
}

/* ==========================================================================
   GLOBAL RESET & INITIAL BASE
   ========================================================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

button,
input,
textarea {
    font-family: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 5px;
    border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* ==========================================================================
   DECORATIVE DYNAMIC BACKGROUND ORBS & WATERMARK
   ========================================================================== */
.bg-glow-1,
.bg-glow-2 {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(189, 28, 36, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
    animation: floatingOrb 12s infinite alternate ease-in-out;
}

.bg-glow-1 {
    top: -100px;
    right: -100px;
}

.bg-glow-2 {
    top: 50%;
    left: -200px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
    animation-delay: -6s;
}

.bg-watermark {
    position: fixed;
    right: 5%;
    bottom: 10%;
    font-family: 'Noto Serif JP', serif;
    font-size: 30vw;
    font-weight: 900;
    color: rgba(189, 28, 36, 0.02);
    pointer-events: none;
    z-index: -2;
    user-select: none;
}

@keyframes floatingOrb {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(80px, 40px) scale(1.15);
    }
}

/* ==========================================================================
   HEADER & NAVIGATION STYLING
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--bg-glass);
    backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid var(--border-glass);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: var(--transition-fast);
}

.header.scrolled {
    height: 70px;
    background-color: rgba(10, 10, 10, 0.95);
    border-bottom: 1px solid var(--border-glass-focus);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--text-primary);
}

.logo span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    border-bottom: 2px solid var(--accent-color);
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 0;
    letter-spacing: 1px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.header-socials {
    display: flex;
    gap: 16px;
}

.header-socials a {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.02);
}

.header-socials a:hover {
    color: var(--text-primary);
    border-color: var(--border-glass-focus);
    background: var(--accent-color-glow);
    transform: translateY(-3px) rotate(5deg);
    box-shadow: 0 0 15px var(--accent-color-glow);
}

/* Hamburger Icon */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1100;
}

.hamburger .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition-smooth);
}

/* ==========================================================================
   BUTTONS & TYPOGRAPHY UTILITIES
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--text-primary);
    border: 1px solid var(--accent-color);
    box-shadow: 0 4px 20px var(--accent-color-glow);
}

.btn-primary:hover {
    background: var(--accent-gradient-hover);
    box-shadow: 0 6px 24px rgba(189, 28, 36, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(189, 28, 36, 0.1);
    border-color: var(--border-glass-focus);
    transform: translateY(-2px);
}

.btn i {
    width: 18px;
    height: 18px;
    transition: var(--transition-fast);
}

.btn:hover i {
    transform: translate(2px, -2px) scale(1.1);
}

.gradient-text {
    background: linear-gradient(135deg, #f5f5f7 30%, #bd1c24 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px rgba(189, 28, 36, 0.2);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--header-height) + 40px) 24px 60px 24px;
    position: relative;
}

.hero-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold-color);
    margin-bottom: 16px;
    display: inline-block;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 24px;
    letter-spacing: 1px;
}

.typewriter-text {
    border-right: 3px solid var(--accent-color);
    white-space: nowrap;
    animation: blinkTypingCursor 0.8s infinite;
}

@keyframes blinkTypingCursor {
    50% {
        border-color: transparent;
    }
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 20px;
}

.hero-graphic {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.image-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    padding: 8px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--gold-color) 100%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    animation: floatAnimation 6s infinite ease-in-out;
}

.glow-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 2px dashed var(--accent-color);
    animation: rotateRing 30s infinite linear;
}

@keyframes rotateRing {
    100% {
        transform: rotate(360deg);
    }
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-primary);
}

@keyframes floatAnimation {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Scroll Down Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 5;
}

.scroll-indicator a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: var(--font-heading);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-indicator a:hover {
    color: var(--text-primary);
}

.mouse-icon {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.mouse-icon .wheel {
    width: 4px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollMouseWheel 1.6s infinite ease-in-out;
}

@keyframes scrollMouseWheel {
    0% {
        top: 6px;
        opacity: 1;
    }

    80% {
        top: 22px;
        opacity: 0;
    }

    100% {
        top: 6px;
        opacity: 0;
    }
}

/* ==========================================================================
   COMMON SECTION STYLING
   ========================================================================== */
section {
    padding: 100px 24px;
}

.section-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 60px;
    text-align: center;
}

.section-tag {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold-color);
    margin-bottom: 12px;
    display: inline-block;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.section-divider {
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    margin: 16px auto 0 auto;
    border-radius: 2px;
}

/* ==========================================================================
   ABOUT ME SECTION
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: start;
}

.about-info h3,
.about-education h3,
.skills-block h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.samurai-icon {
    color: var(--accent-color);
}

.profile-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.detail-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-glass);
    padding: 16px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
    border-left: 3px solid var(--gold-color);
}

.detail-card:hover {
    border-left-color: var(--accent-color);
    background: rgba(189, 28, 36, 0.03);
    transform: translateX(4px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.detail-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.hobbies-section {
    margin-top: 30px;
}

.hobbies-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.hobby-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(18, 17, 17, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.hobby-badge i {
    width: 16px;
    height: 16px;
    color: var(--accent-color);
}

.hobby-badge:hover {
    background: var(--accent-color-glow);
    border-color: var(--accent-color);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 0 10px var(--accent-color-glow);
}

/* Timeline */
.education-timeline {
    position: relative;
    padding-left: 24px;
    border-left: 2px solid var(--border-glass);
    margin-top: 20px;
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -33px;
    top: 6px;
    width: 14px;
    height: 14px;
    background-color: var(--bg-primary);
    border: 3px solid var(--gold-color);
    transform: rotate(45deg);
    /* Diamond shape like a ninja star/mon */
    transition: var(--transition-fast);
}

.timeline-item:hover .timeline-dot {
    border-color: var(--accent-color);
    background-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

.timeline-date {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold-color);
    display: block;
    margin-bottom: 6px;
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.timeline-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Skills inside About */
.skills-block {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-glass);
}

.skills-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.skills-category h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.skills-category h4 i {
    color: var(--gold-color);
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.skill-badge i {
    width: 14px;
    height: 14px;
    color: var(--accent-color);
}

.skill-badge:hover {
    background: var(--accent-color-glow);
    border-color: var(--accent-color);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* ==========================================================================
   PROJECTS SECTION
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-glass-focus);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.project-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.project-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 5;
}

.project-category {
    background-color: rgba(8, 12, 22, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border-glass);
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-color);
}

.project-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.project-tags span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--border-glass);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    align-self: flex-start;
}

.project-link i {
    width: 16px;
    height: 16px;
    transition: var(--transition-fast);
}

.project-link:hover {
    color: var(--accent-color);
}

.project-link:hover i {
    transform: translate(2px, -2px);
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 60px;
}

.contact-info-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.contact-info-panel h3,
.contact-form-panel h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.contact-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    flex-grow: 1;
}

.info-item {
    display: flex;
    gap: 20px;
    align-items: center;
}

.info-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.info-item:hover .info-icon {
    background: var(--accent-color-glow);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color-glow);
}

.info-icon i {
    width: 22px;
    height: 22px;
}

.info-text span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.info-text a,
.info-text p {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-primary);
}

.info-text a:hover {
    color: var(--accent-color);
}

.social-circles {
    display: flex;
    gap: 12px;
    margin-top: 40px;
}

.social-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.social-circle:hover {
    color: var(--text-primary);
    border-color: var(--accent-color);
    background: var(--accent-color-glow);
    transform: translateY(-3px);
}

.social-circle i {
    width: 18px;
    height: 18px;
}

/* Contact Form Panel */
.contact-form-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: 40px;
}

.contact-form-panel h3 {
    margin-bottom: 30px;
}

.form-row {
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group label .required {
    color: #ef4444;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 20px;
    background: rgba(18, 17, 17, 0.5);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-color);
    background: rgba(18, 17, 17, 0.8);
    box-shadow: 0 0 10px var(--accent-color-glow);
}

/* Form Validation Styling */
.form-group.error input,
.form-group.error textarea {
    border-color: #ef4444 !important;
}

.error-msg {
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 500;
    display: none;
    margin-top: 4px;
}

.form-group.error .error-msg {
    display: block;
}

.btn-submit {
    background: var(--accent-gradient);
    color: var(--text-primary);
    border: 1px solid var(--accent-color);
    width: 100%;
    box-shadow: 0 4px 20px var(--accent-color-glow);
}

.btn-submit:hover {
    background: var(--accent-gradient-hover);
    box-shadow: 0 6px 24px rgba(189, 28, 36, 0.5);
    transform: translateY(-2px);
}

.btn-submit i {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   FOOTER STYLING
   ========================================================================== */
.footer {
    border-top: 1px solid var(--border-glass);
    background: #080808;
    padding: 40px 24px;
}

.footer-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-left .logo {
    display: inline-block;
    margin-bottom: 12px;
}

.footer-left p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-right p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==========================================================================
   MODAL DIALOG (SUCCESS POPUP)
   ========================================================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass-focus);
    width: 90%;
    max-width: 500px;
    padding: 40px;
    border-radius: var(--border-radius-md);
    text-align: center;
    box-shadow: 0 20px 50px rgba(189, 28, 36, 0.15);
    transform: scale(0.85);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
}

.modal-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.modal-icon i {
    width: 32px;
    height: 32px;
}

.modal-content h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.modal-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.modal-close-btn {
    width: 100%;
}

/* ==========================================================================
   RESPONSIVE DESIGN & MEDIA QUERIES
   ========================================================================== */

/* Laptop/Desktop Adjustments (1024px to 1200px) */
@media (max-width: 1200px) {
    html {
        font-size: 15px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .about-grid,
    .contact-grid {
        gap: 40px;
    }
}

/* Tablet Layout (768px to 1023px) */
@media (max-width: 1023px) {
    html {
        font-size: 14px;
    }

    section {
        padding: 80px 24px;
    }

    /* Hero Section Tablet */
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-content {
        align-items: center;
        order: 2;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-graphic {
        order: 1;
    }

    /* About Section Tablet */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    /* Projects Grid Tablet - 2 Columns */
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    /* Contact Section Tablet */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ==========================================================================
   MOBILE BOTTOM BAR — hidden on desktop
   ========================================================================== */
.mobile-bottom-bar {
    display: none;
}

/* Mobile Screen Breakpoint (<767px) */
@media (max-width: 767px) {

    /* Header Hamburger & Mobile Nav Drawer */
    .header .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--bg-secondary);
        border-left: 1px solid var(--border-glass);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 36px;
        transition: right 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        z-index: 1050;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-menu.active {
        right: 0;
    }

    /* Dark dim overlay when menu is open */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(4, 8, 20, 0.6);
        backdrop-filter: blur(4px);
        z-index: 1000;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s ease;
    }

    .nav-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    .nav-link {
        font-size: 1.3rem;
    }

    .header-socials {
        display: none;
        /* Hide header social icons on mobile */
    }

    /* Hamburger Animation States */
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

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

    /* Hero Section Mobile */
    .hero-section {
        padding-top: calc(var(--header-height) + 20px);
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 16px;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .image-wrapper {
        width: 250px;
        height: 250px;
    }

    /* Projects Grid Mobile - 1 Column */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    /* Panel paddings mobile */
    .contact-info-panel,
    .contact-form-panel {
        padding: 30px 20px;
    }

    /* Footer Mobile */
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    /* ===== MOBILE BOTTOM BAR ===== */
    .mobile-bottom-bar {
        display: flex;
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 40px);
        max-width: 340px;
        height: 64px;
        background: rgba(14, 12, 12, 0.92);
        backdrop-filter: blur(16px) saturate(200%);
        border: 1px solid var(--border-glass);
        border-radius: 32px;
        z-index: 1100;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7),
            inset 0 1px 0 rgba(255, 255, 255, 0.07);
        gap: 0;
    }

    /* Left / Right shortcut items */
    .mbb-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        color: var(--text-muted);
        font-size: 0.65rem;
        font-weight: 600;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        transition: var(--transition-fast);
        padding: 6px 12px;
        border-radius: 20px;
        position: relative;
    }

    .mbb-item i {
        width: 20px;
        height: 20px;
        transition: transform 0.25s ease, color 0.25s ease;
    }

    .mbb-item:hover,
    .mbb-item.active {
        color: var(--accent-color);
    }

    .mbb-item:hover i,
    .mbb-item.active i {
        color: var(--accent-color);
        transform: translateY(-2px) scale(1.15);
        filter: drop-shadow(0 0 6px var(--accent-color-glow));
    }

    /* Active gold dot indicator */
    .mbb-item.active::after {
        content: '';
        position: absolute;
        bottom: 2px;
        width: 4px;
        height: 4px;
        background: var(--gold-color);
        border-radius: 50%;
        box-shadow: 0 0 6px var(--gold-color);
    }

    /* Center Hamburger Button */
    .mbb-hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: var(--accent-gradient);
        border: none;
        cursor: pointer;
        position: relative;
        flex-shrink: 0;
        box-shadow: 0 4px 16px rgba(189, 28, 36, 0.5),
            0 0 0 3px rgba(189, 28, 36, 0.15);
        transition: box-shadow 0.3s ease, transform 0.25s ease;
    }

    .mbb-hamburger:hover {
        transform: scale(1.08);
        box-shadow: 0 6px 24px rgba(189, 28, 36, 0.7),
            0 0 0 5px rgba(189, 28, 36, 0.2);
    }

    .mbb-bar {
        display: block;
        width: 22px;
        height: 2.5px;
        background: #fff;
        border-radius: 3px;
        transition: transform 0.35s cubic-bezier(0.77, 0.2, 0.05, 1),
            opacity 0.25s ease,
            width 0.25s ease;
        transform-origin: center;
    }

    /* Hamburger open state -> X */
    .mbb-hamburger.active .mbb-bar:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
    }
    .mbb-hamburger.active .mbb-bar:nth-child(2) {
        opacity: 0;
        width: 0;
    }
    .mbb-hamburger.active .mbb-bar:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }

    /* ===== BOTTOM SHEET OVERLAY ===== */
    .bottom-sheet-overlay {
        position: fixed;
        inset: 0;
        background: rgba(4, 4, 4, 0.65);
        backdrop-filter: blur(5px);
        z-index: 1090;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.35s ease;
    }

    .bottom-sheet-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* ===== BOTTOM SHEET DRAWER ===== */
    .bottom-sheet {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        border-top: 1px solid var(--border-glass);
        border-radius: 24px 24px 0 0;
        z-index: 1095;
        padding: 12px 24px 100px;
        transform: translateY(110%);
        transition: transform 0.45s cubic-bezier(0.32, 0.72, 0, 1);
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.6);
    }

    .bottom-sheet.active {
        transform: translateY(0);
    }

    /* Drag handle */
    .bottom-sheet-handle {
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 2px;
        margin: 0 auto 20px;
    }

    /* "เมนูนำทาง" label */
    .bottom-sheet-label {
        font-family: var(--font-heading);
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 3px;
        text-transform: uppercase;
        color: var(--gold-color);
        margin-bottom: 16px;
    }

    /* Nav rows inside bottom sheet */
    .bottom-sheet-nav {
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin-bottom: 24px;
    }

    .bsn-link {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 14px 16px;
        border-radius: var(--border-radius-md);
        border: 1px solid transparent;
        color: var(--text-secondary);
        font-family: var(--font-heading);
        font-size: 1.05rem;
        font-weight: 600;
        letter-spacing: 0.5px;
        transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    }

    .bsn-link:hover,
    .bsn-link.active {
        background: rgba(189, 28, 36, 0.08);
        border-color: var(--border-glass-focus);
        color: var(--text-primary);
    }

    .bsn-icon {
        width: 42px;
        height: 42px;
        border-radius: var(--border-radius-sm);
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--border-glass);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--accent-color);
        flex-shrink: 0;
        transition: background 0.2s ease, box-shadow 0.2s ease;
    }

    .bsn-link.active .bsn-icon,
    .bsn-link:hover .bsn-icon {
        background: var(--accent-color-glow);
        border-color: var(--accent-color);
        box-shadow: 0 0 12px var(--accent-color-glow);
    }

    .bsn-icon i {
        width: 20px;
        height: 20px;
    }

    .bsn-text {
        flex: 1;
    }

    .bsn-arrow {
        width: 16px;
        height: 16px;
        color: var(--text-muted);
        transition: transform 0.2s ease, color 0.2s ease;
    }

    .bsn-link:hover .bsn-arrow,
    .bsn-link.active .bsn-arrow {
        transform: translateX(3px);
        color: var(--accent-color);
    }

    /* Social row at bottom of sheet */
    .bottom-sheet-socials {
        display: flex;
        gap: 12px;
        justify-content: center;
        padding-top: 16px;
        border-top: 1px solid var(--border-glass);
    }

    .bss-link {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: 1px solid var(--border-glass);
        background: rgba(255, 255, 255, 0.02);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-secondary);
        transition: var(--transition-smooth);
    }

    .bss-link:hover {
        color: var(--text-primary);
        border-color: var(--accent-color);
        background: var(--accent-color-glow);
        transform: translateY(-3px);
        box-shadow: 0 0 14px var(--accent-color-glow);
    }
}