/* CSS Variables for Light/Dark Mode */
:root {
 --bg-color: #fafafa;
 --text-main: #111827;
 --text-muted: #4b5563;
 --border-color: #e5e7eb;
 --card-bg: #ffffff;
 --tag-bg: #f3f4f6;
 --btn-bg: #111827;
 --btn-text: #ffffff;
 --btn-outline: #e5e7eb;
 --btn-outline-text: #111827;
 --accent-color: #2563eb;
 --font-sans: "Inter", sans-serif;
 --font-mono: "JetBrains Mono", monospace;
 --shadow-hover:
   0 10px 25px -5px rgba(0, 0, 0, 0.1),
   0 8px 10px -6px rgba(0, 0, 0, 0.1);
}


[data-theme="dark"] {
 --bg-color: #0f1115;
 --text-main: #f9fafb;
 --text-muted: #9ca3af;
 --border-color: #1f2937;
 --card-bg: #111418;
 --tag-bg: #1f2937;
 --btn-bg: #f9fafb;
 --btn-text: #111827;
 --btn-outline: #374151;
 --btn-outline-text: #f9fafb;
 --accent-color: #3b82f6;
 --shadow-hover:
   0 10px 25px -5px rgba(0, 0, 0, 0.5),
   0 8px 10px -6px rgba(0, 0, 0, 0.5);
}


/* Base Resets */
* {
 box-sizing: border-box;
 margin: 0;
 padding: 0;
 transition:
   background-color 0.4s ease,
   color 0.4s ease,
   border-color 0.4s ease;
}


body {
 font-family: var(--font-sans);
 font-weight: 400;
 background-color: var(--bg-color);
 color: var(--text-main);
 line-height: 1.6;
 padding: 40px 20px;
 overflow-x: hidden;
}


.container {
 max-width: 1100px;
 margin: 0 auto;
}


a {
 color: var(--text-main);
 text-decoration: none;
}


h1,
h2,
h3,
h4 {
 font-family: var(--font-sans);
 font-weight: 700;
 color: var(--text-main);
 margin-bottom: 10px;
}


p {
 line-height: 1.6;
 color: var(--text-muted);
 margin-bottom: 15px;
 font-size: 0.95rem;
}


/* Animations */
@keyframes fadeInUp {
 from {
   opacity: 0;
   transform: translateY(30px);
 }
 to {
   opacity: 1;
   transform: translateY(0);
 }
}


.animate-up {
 animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
 opacity: 0;
}


.delay-1 {
 animation-delay: 0.1s;
}
.delay-2 {
 animation-delay: 0.2s;
}
.delay-3 {
 animation-delay: 0.3s;
}
.delay-4 {
 animation-delay: 0.4s;
}


/* Utility Classes */
.section-title {
 font-size: 1.25rem;
 font-weight: 700;
 margin-bottom: 20px;
 border-bottom: 1px solid var(--border-color);
 padding-bottom: 10px;
 display: flex;
 justify-content: space-between;
}
.view-all {
 font-family: var(--font-mono);
 font-size: 0.8rem;
 color: var(--text-muted);
 font-weight: 400;
}


/* Buttons */
.btn {
 font-family: var(--font-mono);
 padding: 10px 20px;
 border-radius: 0;
 font-size: 0.9rem;
 font-weight: 500;
 cursor: pointer;
 border: 1px solid transparent;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 transition: all 0.3s ease;
}
.btn-primary {
 background-color: var(--btn-bg);
 color: var(--btn-text);
}
.btn-primary:hover {
 transform: translateY(-2px);
 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
 opacity: 0.9;
}
.btn-outline {
 background-color: transparent;
 border-color: var(--btn-outline);
 color: var(--btn-outline-text);
}
.btn-outline:hover {
 border-color: var(--text-main);
 transform: translateY(-2px);
}


/* Header Profile Area */
.header-profile {
 display: flex;
 align-items: center;
 gap: 22px;
 margin-bottom: 42px;
 position: relative;
 padding: 8px 0 0;
}
.profile-img {
 width: 165px;
 height: 165px;
 border-radius: 0;
 object-fit: cover;
 background-color: var(--border-color);
 transition: transform 0.5s ease;
 flex-shrink: 0;
}
.profile-img:hover {
 transform: scale(1.05) rotate(-2deg);
}
.profile-info {
 max-width: 620px;
 padding-top: 2px;
}
.profile-info h1 {
 font-size: 2rem;
 display: flex;
 align-items: center;
 gap: 8px;
 margin-bottom: 6px;
 line-height: 1.08;
}
.profile-info .location {
 color: var(--text-muted);
 font-size: 0.95rem;
 margin-bottom: 8px;
}
.profile-info .titles {
 font-family: var(--font-mono);
 font-weight: 400;
 margin-bottom: 16px;
 font-size: 0.88rem;
 line-height: 1.45;
 max-width: 620px;
}
.action-buttons {
 display: flex;
 gap: 8px;
 flex-wrap: wrap;
 align-items: center;
}
.action-buttons .btn {
 min-height: 42px;
 padding: 0 14px;
 font-size: 0.88rem;
}
.action-buttons .btn-primary {
 min-width: 148px;
}
.action-buttons .btn-outline {
 min-width: 138px;
}


/* Theme Toggle */
.theme-toggle {
 font-family: var(--font-mono);
 position: absolute;
 top: 0;
 right: 0;
 background: var(--tag-bg);
 border: 1px solid var(--border-color);
 color: var(--text-main);
 padding: 8px 12px;
 border-radius: 0;
 cursor: pointer;
 font-weight: 500;
 transition: all 0.3s ease;
}
.theme-toggle:hover {
 background: var(--border-color);
 transform: scale(1.05);
}


/* Main Grid Layout */
.main-grid {
 display: grid;
 grid-template-columns: 2fr 1fr;
 gap: 40px;
}


/* Cards & Tags */
.tags-container {
 display: flex;
 flex-wrap: wrap;
 gap: 10px;
 margin-bottom: 24px;
}
.tag {
 font-family: var(--font-mono);
 background-color: var(--tag-bg);
 color: var(--text-muted);
 padding: 6px 14px;
 border-radius: 999px;
 font-size: 0.85rem;
 transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
 cursor: default;
}
.tag:hover {
 background-color: var(--accent-color);
 color: white;
 transform: translateY(-3px) scale(1.05);
 box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}


/* Full Width Projects Grid */
.full-width-section {
 margin-top: 40px;
}
.projects-grid {
 display: grid;
 grid-template-columns: repeat(3, 1fr);
 gap: 16px;
}
.project-card {
 border: 1px solid var(--border-color);
 padding: 20px;
 border-radius: 12px;
 background-color: var(--card-bg);
 display: flex;
 flex-direction: column;
 text-decoration: none;
 color: inherit;
 transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
 position: relative;
 overflow: hidden;
}
.project-card::before {
 content: "";
 position: absolute;
 top: 0;
 left: 0;
 width: 100%;
 height: 3px;
 background: var(--accent-color);
 transform: scaleX(0);
 transform-origin: left;
 transition: transform 0.4s ease;
}
.project-card:hover {
 transform: translateY(-6px);
 box-shadow: var(--shadow-hover);
 border-color: transparent;
}
.project-card:hover::before {
 transform: scaleX(1);
}
.project-card h4 {
 margin-bottom: 8px;
 color: var(--text-main);
 font-size: 1.1rem;
}
.project-card p {
 font-size: 0.85rem;
 margin-bottom: 16px;
 color: var(--text-muted);
 flex-grow: 1;
}
.project-link {
 font-family: var(--font-mono);
 align-self: flex-start;
 display: inline-block;
 background: var(--tag-bg);
 padding: 6px 12px;
 border-radius: 6px;
 font-size: 0.75rem;
 color: var(--text-main);
 font-weight: 500;
 transition: background 0.3s;
}
.project-card:hover .project-link {
 background: var(--text-main);
 color: var(--bg-color);
}


/* Timeline (Experience) */
.timeline {
 position: relative;
 padding-left: 24px;
 border-left: 2px solid var(--border-color);
 margin-top: 10px;
}
.timeline-item {
 position: relative;
 margin-bottom: 30px;
 transition: transform 0.3s ease;
}
.timeline-item:hover {
 transform: translateX(5px);
}
.timeline-item::before {
 content: "";
 position: absolute;
 left: -31px;
 top: 5px;
 width: 12px;
 height: 12px;
 border-radius: 50%;
 background-color: var(--bg-color);
 border: 2px solid var(--border-color);
 transition: all 0.3s ease;
}
.timeline-header {
 display: flex;
 justify-content: space-between;
 align-items: flex-start;
 gap: 12px;
 margin-bottom: 4px;
}
.timeline-item h4 {
 margin-bottom: 0;
 font-size: 1rem;
 line-height: 1.3;
}
.timeline-item p {
 font-size: 0.85rem;
 margin-bottom: 0;
 color: var(--text-muted);
}
.timeline-date {
 font-family: var(--font-mono);
 font-size: 0.8rem;
 color: var(--text-muted);
 font-weight: 500;
 white-space: nowrap;
 margin-top: 2px;
}


/* Bottom Grid Section */
.bottom-grid {
 display: grid;
 grid-template-columns: repeat(4, 1fr);
 gap: 20px;
 margin-top: 60px;
 border-top: 1px solid var(--border-color);
 padding-top: 40px;
}
.bottom-card {
 border: 1px solid var(--border-color);
 padding: 24px;
 border-radius: 12px;
 background-color: var(--card-bg);
 transition: all 0.3s ease;
}
.bottom-card:hover {
 box-shadow: var(--shadow-hover);
 transform: translateY(-3px);
}
.bottom-card ul {
 list-style: none;
}
.bottom-card li {
 margin-bottom: 12px;
 font-size: 0.9rem;
 color: var(--text-muted);
 transition: color 0.2s;
}
.bottom-card li a {
 color: var(--text-muted);
 transition: color 0.2s;
}
.bottom-card li a:hover {
 color: var(--accent-color);
}
.bottom-contact-list {
 display: flex;
 flex-direction: column;
 gap: 14px;
}
.bottom-contact-list li,
.bottom-contact-list li a {
 font-family: var(--font-mono);
 font-size: 1rem;
 line-height: 1.55;
}
.bottom-connect-actions {
 display: flex;
 flex-direction: column;
 gap: 12px;
}
.bottom-connect-actions .btn {
 width: 100%;
 justify-content: flex-start;
 min-height: 48px;
 padding: 0 18px;
 font-size: 1rem;
 white-space: nowrap;
 }


/* Gallery */
.gallery {
 display: flex;
 gap: 16px;
 margin-top: 20px;
 overflow-x: auto;
 padding-bottom: 20px;
 scrollbar-width: thin;
}
.gallery::-webkit-scrollbar {
 height: 8px;
}
.gallery::-webkit-scrollbar-track {
 background: var(--bg-color);
}
.gallery::-webkit-scrollbar-thumb {
 background: var(--border-color);
 border-radius: 4px;
}


.gallery .gallery-item {
 width: 240px;
 height: 160px;
 background: var(--border-color);
 border-radius: 12px;
 flex-shrink: 0;
 display: flex;
 align-items: center;
 justify-content: center;
 color: var(--text-muted);
 font-size: 0.9rem;
 transition: all 0.4s ease;
 cursor: pointer;
}
.gallery .gallery-item:hover {
 transform: scale(1.05);
 box-shadow: var(--shadow-hover);
}


/* Basic Footer Styling added for formatting */
footer {
 text-align: center;
 margin-top: 60px;
 padding-top: 30px;
 border-top: 1px solid var(--border-color);
 color: var(--text-muted);
 font-size: 0.9rem;
 padding-bottom: 20px;
}


/* Responsive adjustments */
@media (max-width: 900px) {
 .main-grid {
   grid-template-columns: 1fr;
 }
 .bottom-grid {
   grid-template-columns: 1fr 1fr;
 }
 .theme-toggle {
   position: relative;
   margin-bottom: 20px;
   align-self: flex-start;
 }
 .header-profile {
   flex-direction: column;
   align-items: flex-start;
 }
 .projects-grid {
   grid-template-columns: 1fr 1fr;
 }
}
@media (max-width: 600px) {
 .projects-grid {
   grid-template-columns: 1fr;
 }
 .bottom-grid {
   grid-template-columns: 1fr;
 }
 .timeline-header {
   flex-direction: column;
   gap: 4px;
 }
 .timeline-date {
   margin-top: 0;
 }
}
/* Wrapper for the button and CTA */
#chat-widget-wrapper {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
}

/* The "Talk to Dran!" CTA Bubble */
#chat-cta {
    background: var(--text-main);
    color: var(--bg-color);
    padding: 10px 14px;
    border: 1px solid var(--text-main);
    border-radius: 0;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.16);
    font-size: 13px;
    font-family: var(--font-mono);
    font-weight: 500;
    position: relative;
    white-space: nowrap;
    animation: bounce 2s infinite; /* Make it float slightly */
}

/* The little triangle pointing to the button */
#chat-cta::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 7px 0 7px 7px;
    border-style: solid;
    border-color: transparent transparent transparent var(--text-main);
}
#chat-cta::before {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 0 8px 8px;
    border-style: solid;
    border-color: transparent transparent transparent var(--text-main);
}

/* Simple bouncing animation for the CTA */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

#chat-widget-button {
    width: 52px;
    height: 52px;
    border-radius: 0;
    background: var(--text-main);
    color: var(--bg-color);
    border: 1px solid var(--text-main);
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.18);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s, background-color 0.2s ease, color 0.2s ease;
}

#chat-widget-button:hover { 
    transform: translateY(-2px);
    background: var(--accent-color);
    border-color: var(--accent-color);
}
#chat-widget-button svg { width: 24px; height: 24px; }

/* The Chat Container - Updated to be hidden initially */
#chat-container {
    display: none; /* 👈 Hidden by default */
    position: fixed;
    bottom: 100px; /* Shifted up so it doesn't cover the button */
    right: 25px;
    width: 360px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0;
    box-shadow: 0 18px 45px rgba(15, 17, 21, 0.16);
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
}

/* Header & Close Button */
#chat-header {
    background: var(--card-bg);
    color: var(--text-main);
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-sans);
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.chat-header-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.chat-header-copy small {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
}
#close-chat-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 32px;
    height: 32px;
    border-radius: 0;
    font-size: 14px;
    cursor: pointer;
    font-family: var(--font-mono);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
#close-chat-btn:hover { background: var(--tag-bg); }

/* Existing Chat Box Styles (Keep these!) */
#chat-box { height: 350px; padding: 16px; overflow-y: auto; background: var(--bg-color); display: flex; flex-direction: column; gap: 10px; }
.message { padding: 11px 13px; border-radius: 0; max-width: 84%; font-size: 13px; line-height: 1.55; word-wrap: break-word; border: 1px solid var(--border-color); }
.user { background: var(--text-main); color: var(--bg-color); align-self: flex-end; border-color: var(--text-main); font-family: var(--font-mono); }
.bot { background: var(--card-bg); color: var(--text-main); align-self: flex-start; }
#chat-input-area { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--border-color); background: var(--card-bg); }
#chat-input { flex: 1; padding: 12px 14px; border: 1px solid var(--border-color); outline: none; font-size: 13px; font-family: var(--font-sans); background: var(--bg-color); color: var(--text-main); border-radius: 0; }
#chat-input::placeholder { color: var(--text-muted); }
#chat-input:focus { border-color: var(--text-main); }
#send-btn { min-width: 74px; padding: 0 16px; background: var(--text-main); color: var(--bg-color); border: 1px solid var(--text-main); cursor: pointer; font-weight: 700; font-family: var(--font-mono); border-radius: 0; }
#send-btn:hover { background: var(--accent-color); border-color: var(--accent-color); }

.badge-icon {
  width: 20px;
  height: 20px;
  fill: #1d9bf0; /* This is the specific blue used by X/Twitter */
  vertical-align: middle;
  margin-left: 4px;
}

.location-container {
  display: flex;
  align-items: center;
  font-family: var(--font-sans);
  font-weight: 400;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 0.88rem;
  color: #6e6e6e;
}

.location-icon {
  width: 18px;
  height: 18px;
  fill: currentColor; /* It will match your text color automatically */
}
